This function allows to get the hour of a date.
1 date.hour
<date.hour>
<var /> ?
</date.hour>
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Evar | Timestamp |
Returns | |
---|---|
Type | Description |
Integer | It is only get the hour of the date. |
Example
Get the hour of the date.
Copy
<xsql-script name='date_hour_sample1'> <body> <set name='var'> <date format='dd-MM-yyyy HH:mm:ss'>01-02-2004 21:30:10 GMT</date> </set> <println><date.hour><var /></date.hour></println> </body> </xsql-script>
Returns:
Copy
21