Changing String Data Type to Date

I have a dataset with the follow string format for all of the dates: 2023-11-17 13:26:49 UTC

When I try to simply right click and convert the field to date, I get this error:
Screenshot 2024-01-10 at 11.42.48 AM

I need to the data type in date format for filtering options.

Hello @Jrvish !

Could you try making this a calculated field on your data prep layer using parseDate?

Hi @Jrvish,

On the edit date format view, can you put in the below date format and let us know if it works for you.
yyyy-MM-dd HH:mm:ss ZZZ

Kind regards,
Liv

1 Like

I tried it and it validates, but then throws an error when I try to apply it. Here are some screen shots:

Screenshot 2024-01-11 at 10.06.35 AM

Screenshot 2024-01-11 at 10.07.57 AM


Screenshot 2024-01-11 at 10.08.29 AM

I might be doing the format portion wrong, but these are the two that I attempted but an’t get them to go through without errors:

Screenshot 2024-01-11 at 10.16.50 AM
Screenshot 2024-01-11 at 10.19.17 AM

Hello @Jrvish !

Can you try it without the brackets ?

So try this:
parseDate({Action Date}, 'yyyy-MM-ddTkk:mm:ss.SSSZ')

Let me know if that works!

1 Like

Just tried it, a few times and even closed QuickSight and reopened it just in case, and this is the error that I keep getting:

Screenshot 2024-01-11 at 12.22.38 PM

Ok, sorry. I just ran it with the other format and your way without the brackets worked! Of course it had to be that simple… Haha thanks for the help!

Screenshot 2024-01-11 at 12.26.56 PM

2 Likes

Thanks for confirming that that worked @Jrvish! Glad @DylanM was able to help resolve this for you! :slight_smile:

Hey @Jrvish !

No problem at all, I’m glad it worked!