Skip to content

Time Format

In form development, handling time and date formats is a common requirement. Through format configuration, you can flexibly display dates and times.

NameDescriptionExample
yyyyYear (four digits)2016
yyYear (two digits)16
MMMonth (two digits)01
MMonth (one digit)1
MMMMMonth (English)January
MMMMonth (English abbreviation)Jan
ddDate (two digits)01
dDate (one digit)1
DoDate (abbreviation)1st
DDDay of week (two digits)00
DDay of week (one digit)0
ddddDay of week (English)Monday
dddDay of week (English abbreviation)Mon
HHHour (24-hour format, two digits)01
HHour (24-hour format, one digit)1
hhHour (12-hour format, two digits)01
hHour (12-hour format, one digit)1
mmMinute (two digits)01
mMinute (one digit)1
ssSecond (two digits)01
sSecond (one digit)1
SSSMillisecond (three digits)019
SSMillisecond (two digits)01
SMillisecond (one digit)1
AAM/PM (uppercase)AM/PM
aAM/PM (lowercase)am/pm
ZZTimezone+0800

Custom Time Format

You can freely combine these format symbols to create the desired time format. For example:

  • yyyy年MM月dd日 Output example: 2016年01月01日
  • yyyy-MM-dd HH:mm:ss Output example: 2024-08-27 14:05:30
  • MM/dd/yy Output example: 12/24/16
  • H点m分s秒 Output example: 9点41分0秒
  • HH:mm Output example: 14:05
  • HH:mm:ss Output example: 14:05:30

FormCreate is an open-source project released under the MIT License. Free for personal and commercial use.