Equivalent Functions & Operators

e6dataAthena

current_date()

current_date

current_date(timezone)

current_date AT TIME ZONE timezone

current_timestamp()

current_timestamp

current_timestamp(timezone)

current_timestamp AT TIME ZONE timezone

last_day( <date/datetime expr> )

date_trunc('month', date) + interval '1' month - interval '1' day

date_trunc(unit, <expr> )

DATE_TRUNC('unit', timestamp)

date_add(unit, value, <date expr>)

date_add(unit, value, timestamp)

date_diff( <date expr1>, <date expr2>, [<unit> optional])

date_diff(unit, timestamp1, timestamp2)

timestamp_add(unit, value, <timestamp expr>)

date_add(unit, value, timestamp)

timestamp_diff(<timestamp expr1>, <timestamp expr2>, unit)

date_diff(unit, timestamp1, timestamp2)

to_timestamp( <expr> )

to_timestamp(string, format)

datetime(<expr>, <time zone>)

<exp> AT TIME ZONE <time zone>

from_unixtime(<expr>, [<unit> optional])

from_unixtime(unixtime)

to_unix_timestamp( <expr> )

to_unixtime(expr)

format_date( <expr>, format)

format_datetime(timestamp, format)

format_timestamp(<expr>, format)

format_datetime(timestamp, format)

extract( unit FROM <datetime expr>)

extract(field FROM x)

current_timestamp + interval '8' minute

timestamp '2012-10-31 01:00' + interval '1' month

array_to_string( <expr>, delimiter)

array_join(x, delimiter, null_replacement)

json_value( <json expr>, <json-path>)

json_extract_scalar(json, json_path)

Last updated