Converting strings into dates


Can anyone help me with how I go about changing the string in the screenshot above into a date format quicksight can understand and use? (e.g “Fri, 02 Dec 2022 09:59:38.699 GMT+0000”)

We also have columns that hold a unix timestamp (e.g. 1675239632402) - can anyone help with how we go about converting these into usable datetime for quicksight to use?

Hi @jlg - welcome to the QuickSight community :slight_smile:

From the QuickSight documentation here: Customizing date formats in Amazon QuickSight - Amazon QuickSight

The following date types are not supported.

  • Time zones offset with a colon. For example, +07:00.
  • Time zones offset without a colon. For example, +0730.

However, you should be able to use the unix timestamp, as mentioned in the link above

Example	         Description	             Token
1632184215      Unix timestamp                 X
1632184215000    Millisecond Unix timestamp    x

Let us know if this answers your question, in which case please mark it as a solution to help others in the community

1 Like

Hi, thanks for the reply - unfortunately that doesn’t seem to have worked with x or X

I dont know if it has to a date type in the dataset already to be able to use those formatting options on that url you gave

@jlg please see the screenshot below

I took the two values in your screenshot above to calculate the epochtime column:
image

Here is the formula I used to create the calculated field:

epochDate({unix_time})

And here is the doc for reference: epochDate - Amazon QuickSight

Does this solve the issue for you?

1 Like

Yes that has worked thank you!

So I am guessing I could potentially use calculated field to take my other date formats (“Wed, 25 Jan 2023 15:16:56.138 GMT+0000”) to also convert if I do some string manipulation first?

@jlg Great to hear that worked for you. And please see this link for the supported date formats: Supported date formats - Amazon QuickSight

1 Like