'Parse string to date in HQL query

I'm trying to create a new table parsing some of the fields so they can match in some unions I'm using below. For the most part using CAST works just fine, that is for changing formats from string to double, but for dates I'm getting an issue.

This is what I'm trying to do:

CREATE TABLE table2 AS
SELECT
    col1
    ,col2
    ,col3
    ,CAST(col4 AS double) AS col4
    ,CAST(date AS date) AS report_date
FROM table1

How can I change the format of the "date" column to be in as a date?

Thanks

hql


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source