Difference between revisions of "STRFTIME()"
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
Line 29: | Line 29: | ||
|%d||Day of the month (two digits with leading zero)||''01'' to ''31'' | |%d||Day of the month (two digits with leading zero)||''01'' to ''31'' | ||
|- | |- | ||
− | |%e||Day of the month (space precedes single digits)||''1'' - ''31'' | + | |%e||Day of the month (space precedes single digits)||'' 1'' - ''31'' |
|- | |- | ||
|%j||Day of the year (three digits with leading zeros)||''001'' - ''366'' | |%j||Day of the year (three digits with leading zeros)||''001'' - ''366'' | ||
Line 57: | Line 57: | ||
|'''Year'''|||| | |'''Year'''|||| | ||
|- | |- | ||
− | |%C|| | + | |%C||Century||''19'' (1900 - 1999) - ''20'' (2000 - 2037) |
|- | |- | ||
− | |%g|| | + | |%g||ISO-8601 two digit year: week 01 is the first week with at least 4 weekdays, Monday start||''00'' - ''99'' |
|- | |- | ||
− | |%G|| | + | |%G||ISO-8601 four digit year: week 01 is the first week with at least 4 weekdays, Monday start||''1902'' - ''2037'' |
|- | |- | ||
− | |%y|| | + | |%y||Two digit year||''00'' - ''99'' |
|- | |- | ||
− | |%Y|| | + | |%Y||Four digit year||''1902'' - ''2037'' |
|- | |- | ||
|'''Time'''|||| | |'''Time'''|||| | ||
|- | |- | ||
− | |%H|| | + | |%H||Two digit hour in 24 hour format||''00'' - ''23'' |
|- | |- | ||
− | |%I|| | + | |%I||Two digit hour in 12 hour format||''01'' - ''12'' |
|- | |- | ||
− | |%l|| | + | |%l||Two digit hour in 12 hour format (space precedes single digits)||'' 1'' - ''12'' |
|- | |- | ||
− | |%M|| | + | |%M||Two digit minutes||''00'' - ''59'' |
|- | |- | ||
− | |%p|| | + | |%p||Upper-case AM or PM||''AM'' or ''PM'' |
|- | |- | ||
− | |%P|| | + | |%P||Lower-case AM or PM||''am'' or ''pm'' |
|- | |- | ||
|%r|| | |%r|| |
Revision as of 13:37, 30 November 2009
Purpose
Syntax
STRFTIME(<expC1> [, <expC2> ])
See Also
AMPM(), CDOW(), CMONTH(), CTOD(), CTOT(), DATE(), DATETIME(), DAY(), DAYS(), DOW(), DTOC(), DTOM(), DTOS(), DTOV(), ELAPTIME(), EMPTY(), EPOCH(), GOMONTH(), HOUR(), HOURS(), LTOS(), MDY(), MINUTE(), MINUTES(), MONTH(), MTOD(), MTOS(), QUARTER(), SEC(), SECONDS(), SECS(), SET CENTURY, SET DATE, SET EPOCH, SET HOURS, SET MARK, SET SECONDS, SET VAXTIME, STOD(), STR(), TIME(), TIMESTAMP(), TSTRING(), TTOC(), TTOD(), TYPE(), VAL(), VALIDTIME(), VTOD(), WEEK(), YEAR()
Description
<expC1> is a string which may include any of the format elements from the table below. The optional <expC2> is a date or datetime in string format. If <expC2> is not specified, the current system date and time are assumed.
Format Element | Description | Example value |
---|---|---|
Day | ||
%a | Abbreviated character day of the week | Sun - Sat |
%A | Character day of the week | Sunday - Saturday |
%d | Day of the month (two digits with leading zero) | 01 to 31 |
%e | Day of the month (space precedes single digits) | 1 - 31 |
%j | Day of the year (three digits with leading zeros) | 001 - 366 |
%u | ISO-8601 numeric day of the week | 1 (Monday) - 7 (Sunday) |
%w | Numeric day of the week | 0 (Sunday) - 6 (Saturday) |
Week | ||
%U | Week of the year: week 01 starts from the first Sunday | 00 - 53 |
%V | ISO-8601 week of the year: week 01 is the first week with at least 4 weekdays, Monday start | 01 to 53 |
%W | Week of the year: week 01 starts from the first Monday | 00 - 53 |
Month | ||
%b | Abbreviated month | Jan - Dec |
%B | Month | January - December |
%h | Abbreviated month | Jan - Dec |
%m | Month (two digits with leading zero) | 01 to 12 |
Year | ||
%C | Century | 19 (1900 - 1999) - 20 (2000 - 2037) |
%g | ISO-8601 two digit year: week 01 is the first week with at least 4 weekdays, Monday start | 00 - 99 |
%G | ISO-8601 four digit year: week 01 is the first week with at least 4 weekdays, Monday start | 1902 - 2037 |
%y | Two digit year | 00 - 99 |
%Y | Four digit year | 1902 - 2037 |
Time | ||
%H | Two digit hour in 24 hour format | 00 - 23 |
%I | Two digit hour in 12 hour format | 01 - 12 |
%l | Two digit hour in 12 hour format (space precedes single digits) | 1 - 12 |
%M | Two digit minutes | 00 - 59 |
%p | Upper-case AM or PM | AM or PM |
%P | Lower-case AM or PM | am or pm |
%r | ||
%R | ||
%S | ||
%T | ||
%X | ||
%z | ||
%Z | ||
Time and Date Stamps | ||
%c | ||
%D | ||
%F | ||
%s | ||
%x | ||
Miscellaneous | ||
%n%D | ||
%t%D | ||
%%%D%%%n%n |
Example
Products
Recital, Recital Server