Datetime as a value?

Hi - I have a dataset with columns endpoint_id (str), room (str), check-in (datetime), check-out (datetime). For every endpoint there are a group of rooms and check-in/out represent the dates that the rooms were last checked-in and out of. I would like to create a visual in quicksight that displays the datetime as the value. How do I get the datetime to display and not as a count?

Hi Isabella - you can either chage the data type of the fields in the dataset itself, or you can add a calculated field in the Analysis using the parseDate() function to convert strings to datetime fields. Like this:
parseDate({your date field}, “YYYY/MM/DD”)

The second part you need to tell it what format the date strings are in currently. You can find the supported datetime formats here: Supported date formats - Amazon QuickSight

Screenshot 2023-10-30 at 1.59.05 PM

I have the fields in the correct type and format I believe. I am looking to display the data in a visual so that the date is shown as the value, rather than the count of records as seen in the image. Is this possible?

Gotcha. Is this a table visual or something else? In general if you want the whole date value to be displayed you should put it into field wells that are blue not green (for dimensions not measures). I know maybe a little un-intuitive, but Values field wells always want to aggregate data.

I would prefer to display the dates in a KPI, if possible I’d like the value to be the date. Is there a way to work around this?

If in a KPI, are you filtering the data to just 1 row (like 1 endpoint/room number)? Trying to understand if there were multiple rows of data how you would pick the checkin date you want to show there.

If you indeed are filtering to one row, then a trick to get a single date displayed would be to use an Insight instead (KPIs dont support displaying just a single date value). Check out this short video and see if that works for you.

1 Like

This works. Thank you!

1 Like

Hi Jesse, Is there a way to achieve the same for a calculated field of type date?