Time Datatype

Hi. I am trying to graph last order cut off and I cannot find a way to convert my data to a time datatype. I was told that there is no way to convert to a time format and use times in a line chart. Is that true or is there another way to do that?

No @jenmosk you can change the data type in QuickSight on the Datasets level or on the Analysis level.

Just give some example so that we can give some some solutions.

1 Like

Time is just a more granular version of Date, so yes you can do this.

We need more info to troubleshoot. Please tell us the process you have done and where the error is.


1 Like

The data format is shown in the screenshot below. I would like reporting day on the x axis and time on the y axis and do a line chart for avg_loc_us and avg_loc_ca. So far I have not been able to graph this because when I try to turn the datatype to datetime in the data prep phase, it says it can’t be validated (as shown in the second screenshot). I have also tried turning the datatype into time at the query level, but when I upload that it says this type is not accepted.

If you want to convert it do a date, it needs to have a day with it. Example: 01/01/2022 09:27:00

You will need to append the day you want and then it would look like this.

dd/MM/yyyy HH:mm:ss

1 Like

Right I did that, but once it is in quicksight, is there a way to separate it so that there is just the time? I haven’t found a way to do that.

Even if you were able to get the time, I think you would run into problems putting it on the y-axis of your line chart. The only aggregations QuickSight will allow you to do on a date field is count and count distinct.

Sorry, no. You can’t have just the time without the date.