Skip to main content

I have a date/time field in my data set that is formatted like so:

 

2020-05-20T00:25:14Z

 

Tableau believes this is a STR. I know the "T" is superfluous - it just separates the date and the time. But, the Z is Zulu time or UTC.

 

I tried converting this field from STR to Date/Time, but I get an error message from Tableau that the field contains an 'invalid month.' I also tried using DATEPARSE, but I can't seem to get the formula right. Tableau says this formula is "valid," but it yields no results:

 

DATEPARSE("YYYY-MM-dd'T'HH:mm:ss'Z'", [Usage Time])

 

Anyone have any ideas?

3 answers
  1. Aug 10, 2020, 6:22 PM

    Since you are getting it as String so you can use

    DATE(REPLACE(REPLACE(020-05-20T00:25:14Z,"T"," "),"Z", " "))

    Thanks

    Deepak

0/9000