I'm trying to create to following view:

```
CREATE OR REPLACE VIEW view_events AS 
(
   SELECT
     "rank"() OVER (PARTITION BY "tb1"."innerid" ORDER BY "tb1"."date" ASC) "r"
   , "tb2"."opcode"
   , "tb1"."innerid"
   , "tb1"."date"
   , From_iso8601_timestamp(tb1.date) as "real_date"
   , "tb2"."eventtype"
   , "tb1"."fuelused"
   , "tb1"."mileage"
   , "tb1"."latitude"
   , "tb1"."longitude"
   FROM
     rt_message_header tb1
   , rt_messages tb2
   WHERE ((("tb1"."uuid" = "tb2"."header_uuid") AND ("tb2"."opcode" = '39')) AND ("tb2"."type" = 'event'))
   ORDER BY "tb1"."innerid" ASC, "tb1"."date" ASC
)

```

and it gives me the following error:

> 
> Your query has the following error(s):
>  Unsupported Hive type: timestamp with time zone
> 
> 
> 

however when I run the query on it's own it works fine, and the From\_iso8601\_timestamp is mentioned [here](https://prestodb.io/docs/current/functions/datetime.html) as a valid date function.

can anyone tell me what I'm doing wrong?