<< Prev        Next >>

ID : 3575

Date/Time Display Formatting Character

Date/time display formatting character is a character to specify display format used in Format function. If an argument used in expression is a string, it will be recognized as date. And, if it is a value, it will be recognized as serial value. It will be converted to specified display format.

Character(s) Description
(:) Use this character as a time separator. Depending on language setting, other characters might be used as time separator. Time will be separated into hour, minute and second with the separator. Time separator after the conversion will be defined by language setting.
(/) Use this character as a date separator. Depending on language setting, other characters might be used. Date will be separated into year, month and date with the separator. Separator after the conversion will be defined by language setting.
c Date and time written in "ddddd" and "t t t t t" format will be returned in date, time order. When there is no decimal part in a specified value, a string with date will be returned. And when no integer part, a string with time will be returned.
d Date will be returned. If it is single digit, 0 will not be set at the head (1 - 31).
dd Date will be returned. If it is single digit, 0 will be set at the head (01 - 31).
ddd Day will be returned in (abbreviated) English word (Sun - Sat).
dddd Day will be returned in English word (Sunday - Saturday).
ddddd Date in short format including year/month/date (set at language setting) will be returned. The default short date format is m/d/yy.
dddddd Date in long format including year/month/date (set at language setting) will be returned. The default long date format is mmmm dd, yyyy.
w A value corresponding to the day will be returned (1 for Sunday through 7 for Saturday).
ww A value for the week of the year will be returned (1 - 54).
m A value corresponding to the month will be returned. If it is single digit, 0 will not be set at the head (1 - 12). However, if m immediately follows h or hh, the minute rather than the month is displayed.
mm A value corresponding to the month will be returned. If it is single digit, 0 will be set at the head (01 - 12). However, if mm immediately follows h or hh, the minute rather than the month is displayed.
mmm Month will be returned in converted (abbreviated) English word (Jan - Dec).
mmmm Month will be returned in English word (January - December).
q A value for the quarter of the year will be returned (1 - 4).
g Capital letter of the name of an era will be returned (M, T, S, H).
e A Japanese calendar (based on the name of an era) will be returned. If it is single digit, 0 will not be set at the head.
ee 2 digits value of Japanese calendar (based on the name of an era) will be returned. If it is single digit, 0 will be set at the head.
y A value for the day of the year will be returned (1 - 366).
yy Last 2 digits of a year will be returned (00 - 99).
yyyy 4 digits of a year will be returned (100 - 9999).
h Time will be returned. If it is single digit, 0 will not be set at the head (0 - 23).
hh Time will be returned. If it is single digit, 0 will be set at the head (00 - 23).
n Minute will be returned. If it is single digit, 0 will not be set at the head (0 - 59).
nn Minute will be returned. If it is single digit, 0 will be set at the head (00 - 59).
s Second will be returned. If it is single digit, 0 will not be set at the head (0 - 59).
ss Second will be returned. If it is single digit, 0 will be set at the head (00 - 59).
t t t t t Time will be returned with the format defined in language setting. A leading zero is displayed if the leading zero option is selected and the time is before 10:00 A.M. or 10:00 P.M. The default time format is h:mm:ss.
AM/PM An uppercase AM with any hour before noon or an uppercase PM with any hour between noon and 11:59 P.M will be returned.
m/pm A lowercase am with any hour before noon or a lowercase pm with any hour between noon and 11:59 P.M will be returned.
A/P An uppercase A with any hour before noon or an uppercase P with any hour between noon and 11:59 P.M will be returned.
a/p A lowercase a with any hour before noon or a lowercase p with any hour between noon and 11:59 P.M will be returned.
AMPM If the "12-hour clock" option is selected, literal string for AM will be returned when the time is with any hour before noon. While, literal string for PM will be returned when the time is with any hour between noon and 11:59 P.M. Setting of these strings and selection of "12-hour clock" should be done by language setting. AMPM can be either uppercase or lowercase. The default format is AM/PM.

ID : 3575

<< Prev        Next >>