Tree View
Tree
List View
Alphabetical List
Share
Share
Search:
id:
161

name:

Date Formats



description:
Sometimes you want to display dates in a particular format that suits the context. Maybe you only want to display the time or the day. You can do this with square brackets notation like so:



Where datevalue is any valid date including square bracket notation references to column names or the current system time [CURRENTDATETIME] and validdateformat is a string built from the components below.

Examples:

MM/dd/yyyy hh:mm tt produces [CURRENTDATETIME]

ddd, dd MMM yyy HH:mm:ss GMT zz produces [CURRENTDATETIME] (this is the format for XML)

Here are more options for date formats

d - Short date
%d - Day number
M?d - Month and day number
dd - Day number, two digits
ddd - Abbreviated day name
dddd - Full day name
f - Full (long date, short time)
%f - Fractions of second, one digit
s^f - Seconds and fractions of second, one digit
ff - Fractions of second, two digits
fff - Fractions of second, three digits
ffff - Fractions of second, four digits
g - General
%g - Era (eg. A.D.)
y-g - Year and era (eg. 5-A.D.)
gg - Era (eg. A.D.)
h - Hour (1-12) (Doesn't seem to work)
%h - Hour (1-12)
h-m - Hour and minute
hh - Hour (01-12)
H - Hour (0-23) (Doesn't seem to work)
HH - Hour (00-23)
m - Month name and date
%m - Minute (0-59)
hh_m - Hour and minute (0-59)
mm - Minute (00-59)
M - Month name and date
%M - Month number (1-12)
M d - Month number and day number
MM - Month number (01-12)
MMM - Month abbreviation
MMMM - Month name
s - Standard sortable date/time
%s - Seconds (0-59)
s^ff - Seconds (0-59) and fraction of seconds
ss - Seconds (00-59)
t - Long time
%t - First letter of AM/PM designator
hh t - Hour and first letter of AM/PM designator
tt - AM/PM designator
y - Short date
%y - Year (0-99)
m-y - Month and year
yy - Year (00-99)
yyyy - Year (0000-9999)
z - Doesn't work
%z - Whole hour time zone (-12 to 13)
Zone:z - Zone - and whole hour time zone (-12 to 13)
zz - Whole hour time zone (-12 to 13) with two digits
zzz - Time zone in hours and minutes})


ParentTopic:
 

go to page: 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 ... 243 records. Showing