DATETIME
Return the components of a date and time string.
WebVue support - Yes.
|
Mode |
Mnemonic |
Syntax |
| 1 | DAY | 1 |
| 2 | MONTH | 1 |
| 3 | YEAR | 1 |
| 4 | HOUR | 1 |
| 5 | MINUTE | 1 |
| 6 | SECOND | 1 |
| 7 | MILLISECOND | 1 |
| 8 | WEEKDAY | 1 |
| 9 | YEARDAY | 1 |
| 10 | ISLEAPYEAR | 1 |
Syntax 1
IntVal = DATETIME(Mode [, DateTime]);
Return type: INTEGER.
|
Argument |
Meaning |
|
DateTime |
The date and time on which to operate. If it is not supplied
the current date and time is used. Type STR. |
Execution
|
Mode |
Mnemonic |
Action |
|
1 |
DAY |
Returns the day of the month (1 to 31). |
|
2 |
MONTH |
Returns the month number (1 to 12). |
|
3 |
YEAR |
Returns the year (1980 to 2106). |
|
4 |
HOUR |
Returns the hour (0 to 23). |
|
5 |
MINUTE |
Returns the number of minutes (0 to 59) |
|
6 |
SECOND |
Returns the number of seconds (0 to 59). |
|
7 |
MILLISECOND |
Returns the number of milliseconds (0 to 999). |
|
8 |
WEEKDAY |
Returns the day of the week. (0 to 6: Sunday = 0, Monday = 1 etc.) |
|
9 |
YEARDAY |
Returns the day of the year (1 to 366). |
|
10 |
ISLEAPYEAR |
Returns 1 if a leap year, else 0. |
Example
For an example, select the Example link above.