# Datetime as a value?

**URL:** <https://community.amazonquick.com/t/datetime-as-a-value/20584>\
**Category:** Q&A\
**Tags:** visuals, Business-Intelligence-Engineer, quick-sight\
**Created:** [October 30, 2023, 6:10pm UTC](https://community.amazonquick.com/t/datetime-as-a-value/20584 "2023-10-30T18:10:49Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![isabella](https://avatars.discourse-cdn.com/v4/letter/i/ecb155/32.png) [@isabella](https://community.amazonquick.com/u/isabella)\
**Post date:** [October 30, 2023, 6:10pm UTC](https://community.amazonquick.com/t/datetime-as-a-value/20584/1 "2023-10-30T18:10:50Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Jesse](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/jesse/32/177_2.png) [@Jesse](https://community.amazonquick.com/u/Jesse)\
**Post date:** [October 30, 2023, 6:27pm UTC](https://community.amazonquick.com/t/datetime-as-a-value/20584/2 "2023-10-30T18:27:13Z")

</div>

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](https://docs.aws.amazon.com/quicksight/latest/user/supported-date-formats.html)

---

<div class="post-metadata">

**Author:** ![isabella](https://avatars.discourse-cdn.com/v4/letter/i/ecb155/32.png) [@isabella](https://community.amazonquick.com/u/isabella)\
**Post date:** [October 30, 2023, 7:01pm UTC](https://community.amazonquick.com/t/datetime-as-a-value/20584/3 "2023-10-30T19:01:57Z")

</div>

![Screenshot 2023-10-30 at 1.59.05 PM](https://d1wl4jav5dp96l.cloudfront.net/original/2X/6/6b2197a320c4236e084f9c2f1224d4042579dae7.png)

 ![Screenshot 2023-10-30 at 1.58.38 PM](https://d1wl4jav5dp96l.cloudfront.net/original/2X/d/d2766494673104170a42b526e5e7fb6e3c9a5dbb.png)

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?

---

<div class="post-metadata">

**Author:** ![Jesse](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/jesse/32/177_2.png) [@Jesse](https://community.amazonquick.com/u/Jesse)\
**Post date:** [October 30, 2023, 8:15pm UTC](https://community.amazonquick.com/t/datetime-as-a-value/20584/4 "2023-10-30T20:15:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![isabella](https://avatars.discourse-cdn.com/v4/letter/i/ecb155/32.png) [@isabella](https://community.amazonquick.com/u/isabella)\
**Post date:** [October 30, 2023, 8:19pm UTC](https://community.amazonquick.com/t/datetime-as-a-value/20584/5 "2023-10-30T20:19:54Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Jesse](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/jesse/32/177_2.png) [@Jesse](https://community.amazonquick.com/u/Jesse)\
**Post date:** [October 30, 2023, 8:44pm UTC](https://community.amazonquick.com/t/datetime-as-a-value/20584/6 "2023-10-30T20:44:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![isabella](https://avatars.discourse-cdn.com/v4/letter/i/ecb155/32.png) [@isabella](https://community.amazonquick.com/u/isabella)\
**Post date:** [October 31, 2023, 12:46pm UTC](https://community.amazonquick.com/t/datetime-as-a-value/20584/7 "2023-10-31T12:46:41Z")

</div>

This works. Thank you!

---

<div class="post-metadata">

**Author:** ![bushra](https://avatars.discourse-cdn.com/v4/letter/b/fbc32d/32.png) [@bushra](https://community.amazonquick.com/u/bushra)\
**Post date:** [February 2, 2024, 6:36am UTC](https://community.amazonquick.com/t/datetime-as-a-value/20584/8 "2024-02-02T06:36:37Z")

</div>

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