Loading

Date and time functions

These functions extract date and time components from timestamps. All values are computed in UTC.

Returns the day of the month for each of the input timestamps (in UTC). Returned values are from 1 to 31.

Return type

instant_vector

Parameters

v (instant_vector, optional)
Optional instant vector input. If omitted, evaluation timestamp is used.

Example

day_of_month()
		

Returns the day of the week for each of the input timestamps (in UTC). Returned values are from 0 to 6, where 0 means Sunday.

Return type

instant_vector

Parameters

v (instant_vector, optional)
Optional instant vector input. If omitted, evaluation timestamp is used.

Example

day_of_week()
		

Returns the day of the year for each of the input timestamps (in UTC). Returned values are from 1 to 366.

Return type

instant_vector

Parameters

v (instant_vector, optional)
Optional instant vector input. If omitted, evaluation timestamp is used.

Example

day_of_year()
		

Returns the number of days in the month for each of the input timestamps (in UTC). Returned values are from 28 to 31.

Return type

instant_vector

Parameters

v (instant_vector, optional)
Optional instant vector input. If omitted, evaluation timestamp is used.

Example

days_in_month()
		

Returns the hour of the day for each of the input timestamps (in UTC). Returned values are from 0 to 23.

Return type

instant_vector

Parameters

v (instant_vector, optional)
Optional instant vector input. If omitted, evaluation timestamp is used.

Example

hour()
		

Returns the minute of the hour for each of the input timestamps (in UTC). Returned values are from 0 to 59.

Return type

instant_vector

Parameters

v (instant_vector, optional)
Optional instant vector input. If omitted, evaluation timestamp is used.

Example

minute()
		

Returns the month of the year for each of the input timestamps (in UTC). Returned values are from 1 to 12.

Return type

instant_vector

Parameters

v (instant_vector, optional)
Optional instant vector input. If omitted, evaluation timestamp is used.

Example

month()
		

Returns the number of seconds since January 1, 1970 UTC. Note that this does not actually return the current time, but the time at which the expression is being evaluated.

Return type

scalar

Example

time()
		

Returns the year for each of the input timestamps (in UTC).

Return type

instant_vector

Parameters

v (instant_vector, optional)
Optional instant vector input. If omitted, evaluation timestamp is used.

Example

year()