Equivalent Functions & Operators
Last updated
Last updated
e6data | Athena |
---|---|
e6data | Databricks |
---|---|
e6data | Presto |
---|---|
e6data | Redshift |
---|---|
e6data | Snowflake |
---|---|
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)
approx_quantiles( <expr>, number)
APPROX_QUANTILES( expression, number)
current_date()
current_date()
current_date(timezone)
CURRENT_DATE([time_zone])
current_timestamp()
CURRENT_TIMESTAMP()
current_timestamp(timezone)
DATETIME(CURRENT_TIMESTAMP(), "America/Los_Angeles")
last_day( <date/datetime expr> )
last_day( <date/datetime expr> )
date_trunc(unit, <expr> )
DATE_TRUNC(date_expression, unit)
date_add(unit, value, <date expr>)
DATE_ADD(date_expression, INTERVAL int64_expression date_part)
date_diff( <date expr1>, <date expr2>, [<unit> optional])
DATE_DIFF(date_expression_a, date_expression_b, date_part)
timestamp_add(unit, value, <timestamp expr>)
DATETIME_ADD(datetime_expression, INTERVAL int64_expression part)
timestamp_diff(<timestamp expr1>, <timestamp expr2>, unit)
DATETIME_DIFF(datetime_expression_a, datetime_expression_b, part)
to_timestamp( <expr> )
TIMESTAMP(string_expression[, time_zone])
datetime(<expr>, <time zone>)
DATETIME(timestamp_expression [, time_zone])
from_unixtime(<expr>, [<unit> optional])
format_timestamp("%Y-%m-%d", timestamp_seconds(time))
to_unix_timestamp( <expr> )
UNIX_SECONDS(expr)
format_date( <expr>, format)
FORMAT_DATE(format_string, date_expr)
format_timestamp(<expr>, format)
FORMAT_DATETIME(format_string, datetime_expression)
extract( unit FROM <datetime expr>)
EXTRACT(part FROM date_expression)
current_timestamp + interval '8' minute
current_timestamp + interval '8' minute
array_to_string( <expr>, delimiter)
ARRAY_TO_STRING(array_expression, delimiter[, null_text])
json_value( <json expr>, <json-path>)
JSON_VALUE(json_expr[, json_path])
current_date()
current_date()
current_date(timezone)
from_utc_timestamp(current_date(),timezone)
current_timestamp()
current_timestamp()
current_timestamp(timezone)
from_utc_timestamp(current_timestamp(),timezone)
last_day( <date/datetime expr> )
last_day(expr)
date_trunc(unit, <expr> )
date_trunc(unit, expr)
date_add(unit, value, <date expr>)
dateadd(unit, value, expr)
date_diff( <date expr1>, <date expr2>, [<unit> optional])
datediff(endDate, startDate)
timestamp_add(unit, value, <timestamp expr>)
timestampadd(unit, value, expr)
timestamp_diff(<timestamp expr1>, <timestamp expr2>, unit)
timestampdiff(unit, start, end)
to_timestamp( <expr> )
to_timestamp(expr [, fmt] )
datetime(<expr>, <time zone>)
from_utc_timestamp(expr, timeZone)
from_unixtime(<expr>, [<unit> optional])
from_unixtime(unixTime [, fmt])
to_unix_timestamp( <expr> )
to_unix_timestamp(expr [, fmt] )
format_date( <expr>, format)
date_format(expr, fmt)
format_timestamp(<expr>, format)
date_format(expr, fmt)
extract( unit FROM <datetime expr>)
extract(field FROM source)
datepart( unit, <expr> )
date_part(field, expr)
current_timestamp + interval '8' minute
caldate + interval '1 second'
array_to_string( <expr>, delimiter)
array_join(array, delimiter [, nullReplacement])
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> )
last_day_of_month(x)
date_trunc(unit, <expr> )
date_trunc(unit, x)
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)
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> )
LAST_DAY ( { date | timestamp } )
date_trunc(unit, <expr> )
DATE_TRUNC('unit', timestamp)
date_add(unit, value, <date expr>)
DATEADD( datepart, interval, {date|time|timetz|timestamp} )
date_diff( <date expr1>, <date expr2>, [<unit> optional])
DATEDIFF ( datepart, {date|time|timetz|timestamp}, {date|time|timetz|timestamp} )
timestamp_add(unit, value, <timestamp expr>)
DATEADD( datepart, interval, {date|time|timetz|timestamp} )
timestamp_diff(<timestamp expr1>, <timestamp expr2>, unit)
DATEDIFF ( datepart, {date|time|timetz|timestamp}, {date|time|timetz|timestamp} )
to_timestamp( <expr> )
to_timestamp (timestamp, format)
datetime(<expr>, <time zone>)
<exp> AT TIME ZONE <time zone>
from_unixtime(<expr>, [<unit> optional])
timestamp 'epoch' + CAST(your_timestamp_column AS BIGINT)/1000 * interval '1 second'
to_unix_timestamp( <expr> )
extract(epoch from CURRENT_DATE)
format_date( <expr>, format)
TO_CHAR (timestamp_expression | numeric_expression , 'format')
format_timestamp(<expr>, format)
TO_CHAR (timestamp_expression | numeric_expression , 'format')
extract( unit FROM <datetime expr>)
EXTRACT ( datepart FROM { TIMESTAMP 'literal' | timestamp | time | timetz } )
datepart( unit, <expr> )
DATE_PART(datepart, {date|timestamp})
current_timestamp + interval '8' minute
caldate + interval '1 second'
json_value( <json expr>, <json-path>)
json_extract_path_text('json_string', 'path_elem' [,'path_elem'[, …] ] [, null_if_invalid ] )
current_date()
current_date()
current_date(timezone)
convert_timezone('UTC','timestamp', current_date())
current_timestamp()
current_timestamp()
current_timestamp(timezone)
convert_timezone('UTC','timestamp', current_timestamp())
last_day( <date/datetime expr> )
LAST_DAY( <date_or_time_expr> [ , <date_part> ] )
date_trunc(unit, <expr> )
DATE_TRUNC( <date_or_time_part>, <date_or_time_expr> )
date_add(unit, value, <date expr>)
DATEADD( <date_or_time_part>, <value>, <date_or_time_expr> )
date_diff( <date expr1>, <date expr2>, [<unit> optional])
DATEDIFF( <date_or_time_part>, <date_or_time_expr1>, <date_or_time_expr2> )
timestamp_add(unit, value, <timestamp expr>)
TIMESTAMPADD( <date_or_time_part> , <time_value> , <date_or_time_expr> )
timestamp_diff(<timestamp expr1>, <timestamp expr2>, unit)
TIMESTAMPDIFF( <date_or_time_part> , <date_or_time_expr1> , <date_or_time_expr2> )
to_timestamp( <expr> )
to_timestamp( <expr> )
datetime(<expr>, <time zone>)
CONVERT_TIMEZONE( <target_tz> , <source_timestamp> )
from_unixtime(<expr>, [<unit> optional])
TO_TIMESTAMP( epoch_sec )
to_unix_timestamp( <expr> )
date_part('epoch_second',current_timestamp())
format_date( <expr>, format)
TO_VARCHAR( <date_or_time_expr> [, '<format>' ] )
format_timestamp(<expr>, format)
TO_VARCHAR( <date_or_time_expr> [, '<format>' ] )
extract( unit FROM <datetime expr>)
EXTRACT( <date_or_time_part> FROM <date_or_time_expr> )
datepart( unit, <expr> )
DATE_PART( <date_or_time_part> , <date_or_time_expr> )
current_timestamp + interval '8' minute
caldate + interval '1 second'
array_to_string( <expr>, delimiter)
ARRAY_TO_STRING( <array> , <separator_string> )
json_value( <json expr>, <json-path>)
JSON_EXTRACT_PATH_TEXT( <column_identifier> , '<path_name>' )