Difference between revisions of "STRFTIME()"

From Recital Documentation Wiki
Jump to: navigation, search
Line 81: Line 81:
 
|%P||Lower-case AM or PM||''am'' or ''pm''
 
|%P||Lower-case AM or PM||''am'' or ''pm''
 
|-
 
|-
|%r||
+
|%r||Equivalent of "%I:%M:%S %p"||e.g. ''01:26:04 PM''
 
|-
 
|-
|%R||
+
|%R||Equivalent of "%H:%M"||e.g. ''13:26''
 
|-
 
|-
|%S||
+
|%S||Two digit seconds||''00'' - ''59''
 
|-
 
|-
|%T||
+
|%T||Equivalent of "%H:%M:S%"||e.g. ''13:26:04''
 
|-
 
|-
 
|%X||
 
|%X||

Revision as of 13:48, 30 November 2009

Template:YLM to do

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 Equivalent of "%I:%M:%S %p" e.g. 01:26:04 PM
%R Equivalent of "%H:%M" e.g. 13:26
%S Two digit seconds 00 - 59
%T Equivalent of "%H:%M:S%" e.g. 13:26:04
%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