Date and time formatting characters

Specifier Description Display
(ex. 2021-01-02 17:03:04)
c Formats date using shortdateformat and formats time using longtimeformat if the time is not zero. 2021-01-02 오후 5:03:04
d day of month 2
dd day of month (leading zero) 02
ddd day of week (abbreviation)
dddd day of week (full) 토요일
ddddd shortdateformat 2021-01-02
dddddd longdateformat 2021년 1월 2일 토요일
m month or minutes if preceded by h or hh specifiers. 1
mm month or minutes if preceded by h or hh specifiers, with leading zero. 01
mmm month (abbreviation) 1
mmmm month (full) 1월
y year (2 digits) 21
yy year (two digits) 21
yyyy year (with century) 2021
h hour 17
hh hour (leading zero) 17
n minute 3
nn minute (leading zero) 03
s second 4
ss second (leading zero) 04
z milliseconds 0
zzz milliseconds(leading zero) 000
am/pm use 12 hour clock and display am and pm accordingly pm
a/p use 12 hour clock and display a and p accordingly p
t shorttimeformat 오후 5:03
tt longtimeformat 오후 5:03:04

 

참고 : https://www.freepascal.org/docs-html/rtl/sysutils/formatchars.html

'개발 > 델파이(라자루스)' 카테고리의 다른 글

[델파이] Format  (0) 2021.08.27

+ Recent posts