12 hour clock data format error

I get an unknown error when trying to parse a string as a date format. I’ve configured according to what I believe is a correct format based on the Supported date types but I still can’t get it to work. I’ve tried setting it in the Edit data section or as a calculated field using parseDate().

image

Hi @tsquick123 - Can you try the below, it worked for me. The “HH:mms:ss” format you used is for 24h and since you have AM/PM that doesn’t apply. For more info see here.

If that solves the problem please mark the answer as the solution so others can benefit.

Screenshot 2023-06-16 at 09.53.28

2 Likes

Thanks so much, especially for the swift reply! I didn’t realise 12 hour time requires a different format.

Having now re-read the link in your guidance this makes sense - but perhaps could you include some examples in your documentation to guide the user in 12 hour format. Maybe its just me but I found the joda link quite difficult to understand!

Date formats are not my favourite as well and yours was definitely not something I see often :sweat_smile: . I’ll take your feedback to the team.

1 Like

@eperts Sorry to bother again but it seems that whilst the date format validates, an error occurs when actually trying to save the changes.

Doing it as a calculated field with parseDate gives the following error:

And if I change the data type when viewing the dataset then I get a generic ‘something went wrong’ error and I can’t save & publish:

Do you have any idea what may be going wrong?

Can you not update the date format in the DataSet like you were trying initially? That way you avoid having to parse the date in a calculated field. The problem may be that the parse date doesn’t like the format, but I ll have to do some digging.

Overall it’s cleaner for changes like this to take place at the DataSet level, so when you have multiple dashboard reading from it you only need to make the change one time.

1 Like

Sorry, my reply wasn’t clear - I only tried the parseDate approach when updating the date format in the Dataset approach didn’t work.

This picture is the error I get after I have validated and applied the date format when editing the dataset directly.

hm, this is weird. Can you try the formula with capital “a” at the end ie 'MM/dd/yy, h:m:s A'. In my case lowercase a worked but not uppercase. For your data it may be different.

If that fails I recommend raising a AWS support case. The engineer will have access to your account and QuickSight env logs and will be able to debug the error.

1 Like

Unfortunately that didn’t work either, so I’ll try support then.

I’m going to unselect the solution box as it didn’t t work for me in the end (even though really your solution should have worked I feel!)

Thanks for all your help regardless and hopefully support can help me resolve :slight_smile:

@tsquick123 - One more thing, have you validated that all the data in that datetime column conforms to that format formula? It could be that the formula is correct but you have a mix of different datetime formats in that column.

1 Like

Hi @tsquick123,

Since we have not received a response from you on this question, we are going to archive the question. If you still need this question answered, please create a new question topic.

kind regards,
Wakana