Links

DATE

Casts String to Date

Syntax

DATE(value)

Arguments

Name
Type
Description
Default Value
value
string

Returns

date

Examples

value
Output
'2022-02-01'
date '2022-02-01'
timestamp '2022-02-01 00:00:00'
date '2022-02-01'
timestamp '2022-01-01 00:30:00'
date '2022-01-01'

Transformation job example

SQL

CREATE JOB function_operator_example
ADD_MISSING_COLUMNS = true
AS INSERT INTO default_glue_catalog.upsolver_samples.orders_transformed_data MAP_COLUMNS_BY_NAME
SELECT value,
DATE(value) AS Output
FROM default_glue_catalog.upsolver_samples.orders_raw_data
LET value = '2022-02-01'
WHERE time_filter()
LIMIT 1;

Query result

value
Output
'2022-02-01'
date '2022-02-01'
Last modified 5mo ago