|
Specifies the
format in which dates should be returned to the client browser. The String parameter specifies the format. You can extract individual
portions of the date, such as the day of the week or the month, by using
formatting tokens in String. (The formatting tokens are the same
as those you would use for the ANSI C strftime function).
Note
The time and date functions below use the language set with the C
library locale rather than the operating system locale. The C library
locale is usually set to English.
%a
Abbreviated
name for day of the week (for example, Mon).
%A
Complete
name for day of the week (for example, Monday).
%b
Abbreviated
month name (for example, Feb).
%B
Complete
month name (for example, February).
%c
Date and
time representation that is appropriate for the locale (for example,
05/06/91 12:51:32).
%d
Day of the
month as a decimal number (01–31)
%H
Hour in
24-hour format (00–23).
%I
Hour in
12-hour format (01–12).
%j
Day of the
year as a decimal number (001–366).
%m
Month as a
decimal number (01–12).
%M
Minute as a
decimal number (00–59).
%p
Current
locale's A.M. or P.M. indicator for 12-hour format (for example, PM).
%S
Second as a
decimal number (00–59).
%U
Week of the
year as a decimal number, with Sunday as the first day of the week
(00–51).
%w
Day of the
week as a decimal number, with Sunday as the first day (0–6).
%W
Week of the
year as a decimal number, with Monday as the first day of the week
(00–51).
%x
Date
representation for the current locale (for example, 05/06/91).
%X
Time
representation for the current locale (for example, 12:51:32).
%y
Year
without the century as a decimal number (for example, 69).
%Y
Year with
the century as a decimal number (for example, 1969).
%z, %Z
Time-zone
name or abbreviation; no characters if time zone is unknown.
%%
Percent
sign. |