Description:
Get the day from a date value.
Syntax:
day(dt)
Note:
The function gets the day from date type data dt.
Parameter:
dt |
Date expression whose result is a date or a string of datetime format. can be an integer, which is regarded as the value of computing days@o(). |
Option:
@w |
Get the day of the week from the specified date. For Sunday, return 1; For Monday, return 2, and so on. |
Return value:
Integer
Example:
|
A |
|
1 |
=day(datetime("19800227","yyyyMMdd")) |
27 |
2 |
=day(datetime(12345)) |
1 |
3 |
=day(datetime("2006-01-15 10:20:30")) |
15 |
4 |
=day@w(datetime("19800227","yyyyMMdd")) |
Return 4, which represents Wednesday. |
5 |
=day@w(datetime("2006-01-15 10:20:30")) |
Return 1, which represents Sunday. |
6 |
=day(150) |
22 |
Related function: