Date format
This table shows the description of each time unit.
Time unit | Description |
---|---|
Year |
For example, for the year 1999, yyyy is 1999, while yy is 99. |
Month |
For example, for the month of February, MMMM is February, MMM is Feb, MM is 02, and M is 2. |
Day |
For example, for January 2, dd is 02, while d is 2. |
Hour |
For AM/PM, you must add an a at the end. |
Minute | mm shows the time in minutes. |
Second | ss shows the time in seconds. |
Separators |
|
Example
yyyy-MMM-dd hh:mm a returns this date: 2024-Jan-26 10:55 AM.