The NOW() Function
The NOW function template recognizes the following symbols:
Symbol | Description | Example |
---|---|---|
Day | --- | --- |
d |
Day of the month, 2 digits with leading zeros | from 01 to 31 |
D |
Text representation of the day of the week, 3 letters |
from Mon to Sun
|
j |
Day of the month without leading zeros |
from 1 to 31
|
l |
Full name of the day of the week |
from Monday to Sunday
|
N |
ISO-8601 numeric representation of the day of the week |
from 1 (Monday) to 7 (Sunday)
|
S |
English ordinal suffix for the day of the month, 2 characters |
st , nd , rd , or
th (used with j )
|
w |
Numeric representation of the day of the week |
from 0 (Sunday) to 6 (Saturday)
|
z |
Day of the year (starting from 0) |
from 0 to 365
|
Week | --- | --- |
W |
ISO-8601 week number of the year; the week starts on Monday | Example: 42 (42nd week of the year) |
Month | --- | --- |
F |
Full textual representation of the month |
from January to December
|
m |
Numeric representation of the month, 2 digits with leading zeros |
from 01 to 12
|
M |
Shortened textual representation of the month, 3 letters |
from Jan to Dec
|
n |
Numeric representation of the month without leading zeros |
from 1 to 12
|
t |
Number of days in a specified month |
from 28 to 31
|
Year | --- | --- |
L |
Leap year indicator | 1 if it is a leap year, otherwise 0 . |
o |
ISO-8601 year number. Similar to Y , except if the ISO week
(W ) belongs to the previous or next year, that year is used.
|
Examples: 1999 or 2003 |
Y |
Full numeric representation of the year, 4 digits |
Examples: 1999 , 2003
|
y |
Two-digit representation of the year | Examples: 99 , 03 |
Time | --- | --- |
a |
Ante meridiem (am) or Post meridiem (pm) in lowercase | am or pm |