Commonly Used Elements of the DATE Format Mask

Table 5.4. Commonly Used Elements of the DATE Format Mask

Format

Description

YYYY

Four-digit year.

YEAR

Year, spelled out.

RR

Two-digit year, based on century. If two-digit year is between 50 and 99, then it’s the previous century; if the year is between 00 and 49, it’s the current century.

MM

Two-digit month.

MON

Three-letter abbreviation of the month, in uppercase letters.

MONTH

Month, spelled out, in uppercase letters and padded with blanks.

Month

Month, spelled with, first letter uppercase and padded with blanks to a length of nine characters.

DD

Numeric day (1–31).

DAY

Day of the week, spelled out, in uppercase letters and padded with blanks to a length of nine characters.

DY

Three-letter abbreviation of the day of the week, in uppercase letters.

D

Day of the week number (1–7), where Sunday is day 1, Monday is day 2, and so forth.

DDD

Day of the year (1–366).

DL

Day long format; the equivalent format mask is fmDay, Month DD, YYYY.

HH or HH12

Hours (0–12).

HH24

Hours in military format (0–23).

MI

Minutes (0–59).

SS

Seconds (0–59).

SSSSS

Seconds past midnight (0–86399).

AM or PM

Meridian indicator.

TS

Short time format; the equivalent format mask is HH:MI:SS AM.

WW

Week of the year (1–53).

W

Week of the month (1–5).

Q

Quarter of the year.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值