Standard DateTime Format Strings


Standard Date/Time Format Strings

A standard Date/Time format string consists of a single character format specifier character from Table 13.5.

Table 13.5. Standard Date/Time Format Strings

Format Specifier

Name /Note

Output of Value=CDate("1/2/2003 23:59:11.15")

d

Short date pattern

02/01/2003

D

Long date pattern

02 January 2003

t

Short time

pattern 23:59

T

Long time pattern

23:59:11

f

Full date/time pattern (short time)

02 January 2003 23:59

F

Full date/time pattern (long time)

02 January 2003 23:59:11

g

General date/time pattern (short time)

02/01/2003 23:59

G

General date/time pattern (long time)

02/01/2003 23:59:11

M or m

Month day pattern

02 January

R or r

RFC1123 pattern is the same as custom pattern ddd, dd MMM yyyy HH:mm:ss G\MT

Thu, 02 Jan 2003 23:59:11 GMT

s

Sortable date/time pattern; conforms to ISO 8601 and is the same as custom pattern yyyy-MM-ddTHH:mm:ss

2003-01-02T23:59:11

u

Universal storable date/time pattern-same as custom pattern yyyy-MM-dd HH:mm:ssZ ; does not do time zone conversion

2003-01-02 23:59:11Z

U

Universal sortable date/time pattern-displays universal, rather than local time

02 January 2003 05:59:11

Y or y

Year month pattern

January 2003

Any other single character=

Unknown specifier; SSRS uses default

02/01/2003 23:59:11


Additional information about standard date/time format strings can be found in the .NET Framework Developer's Guide at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconstandarddatetimeformatstrings.asp.



Microsoft SQL Server 2005 Reporting Services
Microsoft SQL Server 2005 Reporting Services
ISBN: 0672327996
EAN: 2147483647
Year: 2004
Pages: 254

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net