Description:
Get the day from a date value.
Syntax:
day(dateExp)
Note:
The function gets the day from dateExp of date type.
Parameters:
dateExp |
Date expression whose result must be the date or the string of Chinese date and time format. |
Options:
@w |
Get the day of the week from the specified date. For Sunday, return 1; For Monday, return 2, and so on. By default, get the day of the month from the specified date. |
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 |
Related functions: