Skip to main content

Module expr_fn

Module expr_fn 

Source

Functionsยง

add_months
Returns the date that is months months after start. The function returns NULL if at least one of the input parameters is NULL.
date_add
Returns the date that is days days after start. The function returns NULL if at least one of the input parameters is NULL.
date_diff
Returns the number of days from start start to end end.
date_part
Extracts a part of the date or time from a date, time, or timestamp expression.
date_sub
Returns the date that is days days before start. The function returns NULL if at least one of the input parameters is NULL.
date_trunc
Truncates a timestamp ts to the unit specified by the format fmt.
from_utc_timestamp
Interpret a given timestamp ts in UTC timezone and then convert it to timezone tz.
hour
Extracts the hour component of a timestamp.
last_day
Returns the last day of the month which the date belongs to.
make_dt_interval
Make a day time interval from given days, hours, mins and secs (return type is actually a Duration(Microsecond))
make_interval
Make interval from years, months, weeks, days, hours, mins and secs.
minute
Extracts the minute component of a timestamp.
next_day
Returns the first date which is later than start_date and named as indicated. The function returns NULL if at least one of the input parameters is NULL.
second
Extracts the second component of a timestamp.
time_trunc
Truncates a time t to the unit specified by the format fmt.
to_utc_timestamp
Interpret a given timestamp ts in timezone tz and then convert it to UTC timezone.
trunc
Truncates a date dt to the unit specified by the format fmt.
unix_date
Returns the number of days since epoch (1970-01-01) for the given date dt.
unix_micros
Returns the number of microseconds since epoch (1970-01-01 00:00:00 UTC) for the given timestamp ts.
unix_millis
Returns the number of milliseconds since epoch (1970-01-01 00:00:00 UTC) for the given timestamp ts.
unix_seconds
Returns the number of seconds since epoch (1970-01-01 00:00:00 UTC) for the given timestamp ts.