Date()
Date()
formats a local date/time.
Syntax
Most common parameters
Date
Parameter | Description | Examples |
D | Day of the week in three letters. | Mon, Sun |
l | Full day of the week. | Monday, Sunday |
d | Day of the month with leading zeros. | 01, 23 |
j | Day of the month without leading zeros. | 1, 23 |
M | Name of the month in three letters. | May, Nov |
m | Number of the month with leading zeros. | 01, 12 |
n | Number of the month without leading zeros. | 1, 12 |
Y | Full number of the year.. | 2014 |
j | Number of the year in two digits. | 14 |
Time
Parameter | Description | Examples |
H | 12 hour format with leading zeros. | 01, 12 |
g | 12 hour format without leading zeros. | 1, 12 |
h | 24 hour format without leading zeros. | 0, 24 |
G | 24 hour format withoutout leading zeros. | 0, 24 |
i | Minutes with leading zeros. | 01, 54 |
s | Seconds with leading zeros. | 01, 50 |
Examples