Formatting Time and Date: The Time and Date Format Suffixes
2012-07-10 13:51
651 查看
Suffix | Replaced By |
a | Abbreviated weekday name |
A | Full weekday name |
b | Abbreviated month name |
B | Full month name |
c | Standard date and time string formatted as day month date hh::mm:ss tzone year |
C | First two digits of year |
d | Day of month as a decimal (01 to 31) |
D | month/day/year |
e | Day of month as a decimal (1 to 31) |
F | year-month-day |
h | Abbreviated month name |
H | Hour (00 to 23) |
I | Hour (01 to 12) |
j | Day of year as a decimal (001 to 366) |
k | Hour (0 to 23) |
l | Hour (1 to 12) |
L | Millisecond (000 to 999) |
m | Month as decimal (01 to 13) |
M | Minute as decimal (00 to 59) |
N | Nanosecond (000000000 to 999999999) |
P | Locale's equivalent of AM or PM in uppercase |
p | Locale's equivalent of AM or PM in lowercase |
Q | Milliseconds from 1/1/1970 |
r | hh:mm (12-hour format) |
R | hh:mm (24-hour format) |
S | Seconds (00 to 60) |
s | Seconds from 1/1/1970 UTC |
T | hh:mm:ss (24-hour format) |
y | Year in decimal without century (00 to 99) |
Y | Year in decimal including century (0001 to 9999) |
z | Offset from UTC |
Z | Time zone name |
相关文章推荐
- [React Intl] Format Date and Time Using react-intl FormattedDate and FormattedTime
- Date and Time Format Patterns
- JavaSE8-The New Date and Time API(2)
- short or long (date and time)format display
- ASP Format Date and Time Script
- Java Date, Time and Format
- Java 8 Date Time API Example Tutorial – LocalDate, Instant, LocalDateTime, Parse and Format
- [原创]DateTime在使用 format Custom Date and Time Format Strings时遇到的问题和解决方法
- 2.5 Picking the Date and Time with UIDatePicker
- Unity64 AStarPath 寻路失效 Bug解决 IOS64 IL2CPP - Bad date/time format in the zip file
- JavaSE8-The New Date and Time API(1)
- Getting the Current Date and Time
- Custom Date and Time Format Strings
- Custom Date and Time Format Strings
- Formatting Date and Time
- #370 – 通过绑定显示当前时间(Binding a Label’s Content to the Current Date and Time)
- [原] XAF How to see and edit the time part in the DatePropertyEditor for the System.DateTime property
- 10 ways to format time and date using JavaScript
- Convert and Cast for Date and Money format.
- Get the Degree of Angle Between Hour and Minute Hand of a Clock at Anytime