Tostring record for your convenience, and tostring record viewing
C
Currency
2.5.ToString ("C ")
¥2.50
D
Decimal number
25. ToString ("D5 ")
00025
E
Scientific type
25000. ToString ("E ")
2.500000
#encoding =utf-8From __future__ Import DivisionImport time# 13-5. Geometric. Creates a point class that consists of an ordered numeric pair (x, Y) that represents the x-coordinate of a dot and the Y-seatHeader The X and Y coordinates are passed to
C
Currency
2.5.ToString("C")
¥2.50
D
Decimal number
ToString("D5")
00025
E
Scientific type
25000.ToString("E")
2.500000E+005
F
Fixed point
ToString("F2")
C # Comparing string and string Common functions Example August 26, 2007 Sunday 02:29 There are several ways to compare strings in C #, such as:1. String.Compare (x, y);2. String. Equals (x, y);If the comparison is not case-sensitive, the
GMT: Hotell gyllene Geten Standard TimeBeijing Time =gmt time + 8 hoursDatatime nowdate = Datatime.now;Nowdate.tostring ("R"); Effect: Wed, 16:24:33 GMTExplanation of the parameters:D ShortDatePatternD LongdatepatternF Full Date and time (long date
When searching for the membership management system today, I found that the previous search time method was not scientific, and the efficiency was not too high. the time format "14:32:12" is saved in the database when the specified query time is
Format:Convert(Data_type, expression[, Style])Convert(Varchar, field name,Format type)
Note:This style is generally in the time type (datetime, smalldatetime) and string type (nchar, nvarchar, Char, varchar)It is used only when they are converted
Today, we know that datetime. tostring has so many other methods. With this example, it is much easier to get time strings of different formats.
Using system;Using system. Globalization;
Public class mainclass {Public static void main (string []
Recently in doing third-party payment, the use of the ISO8583 package, because some fields require a specific format, so the common are moved over, in case of a rainy days, knowledge is unlimited, the brain is unlimited.
C
SQL code
CONVERT (nvarchar (10), count_time, 121): CONVERT is a date conversion function, generally in the time type (datetime, smalldatetime) and string type (nchar, nvarchar, char, varchar) the three parameters of the
It is still a problem encountered at work. Generally, a date Widget is provided on the UI to allow users to select a date. The general logic is the short date mode of DateFormatter. However, on the UI, some locale formats (such as Polish) are Medium:
Format a number
Description of format characters and associated attributes
--------------------------------------------------------------------------------
C and C currency formats.
In decimal format.
E, E scientific count (INDEX) format.
F and F
/* Environment: win7 + SQL Server 2008 r2author: ccdesctiption: the default datetime format of the Chinese version of SQL Server is yyyy-mm-dd thh: mm: Ss. mmm example: Select getdate () 14:48:49. 913 */ Select ' ---- YY-MM-DD ---- '
Original article: http://blog.sina.com.cn/s/blog_4f3247900100alqj.html
The datetime. tostring () function has four overloads. Generally, it is the one with no parameters. It is unknown that datetime. tostring (string format) is more powerful and
Use the DateTime module to get the current date and time1 Import datetime 2 i=datetime.datetime.now ()3print (" current date and time is%s"% IUse the DateTime module to get the current year1 Import datetime 2 i=datetime.datetime.now ()3print ("
Reproduced1. String functionsFunction Name Parameter Example descriptionASCII (string expression)Select ASCII (' ABC ') returns 97Returns the ASCII code of the leftmost character in the string.Char (An integer expression)Select char (100) returns
Job One: organize regular expression BlogsHave finished finishing.Job Two: grep jobs (regular expressions and character processing)Target file/etc/passwd, using the grep command or Egrep1. All rows containing root are displayed:[[email protected] ~]#
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.