# Dashboard ui\_Form Date

**URL:** <https://discourse.nodered.org/t/dashboard-ui-form-date/32511>\
**Category:** Dashboard\
**Created:** [6 September 2020 15:24 UTC](https://discourse.nodered.org/t/dashboard-ui-form-date/32511 "2020-09-06T15:24:43Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![knubbl](https://avatars.discourse-cdn.com/v4/letter/k/e9a140/32.png) [@knubbl](https://discourse.nodered.org/u/knubbl)\
**Post date:** [7 September 2020 12:58 UTC](https://discourse.nodered.org/t/dashboard-ui-form-date/32511/21 "2020-09-07T12:58:29Z")

</div>

Thanks for your help.

Im not happy with the fact i have to convert but it works now and i can go on with my flow.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [7 September 2020 13:01 UTC](https://discourse.nodered.org/t/dashboard-ui-form-date/32511/22 "2020-09-07T13:01:51Z")

</div>

Strictly speaking, you don't have to. The time is actually correct. UTC 23:00 is the same as 00:00 UTC+1

It all depends on what you're doing with the date.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [7 September 2020 13:18 UTC](https://discourse.nodered.org/t/dashboard-ui-form-date/32511/23 "2020-09-07T13:18:12Z")

</div>

It may seem odd that the date is given in that format but as @Steve-Mcl says it depends on what you want to do with it. Suppose, for example, that you wanted to create a timestamp that was 09:00 local time on the day selected in the form. To get that you can simply add 9 hours to the timestamp returned by the form and you will get the correct timestamp.

---

<div class="post-metadata">

**Author:** ![knubbl](https://avatars.discourse-cdn.com/v4/letter/k/e9a140/32.png) [@knubbl](https://discourse.nodered.org/u/knubbl)\
**Post date:** [7 September 2020 13:33 UTC](https://discourse.nodered.org/t/dashboard-ui-form-date/32511/24 "2020-09-07T13:33:23Z")

</div>

I want to write a value and a timestamp (date) to a database. So i was trying to use the ui\_form for input the value and the date .

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [7 September 2020 13:39 UTC](https://discourse.nodered.org/t/dashboard-ui-form-date/32511/25 "2020-09-07T13:39:14Z")

</div>

in which case, ideally, a database timestamp should be UTC.

Only your presentation layer should handle timezone formatting.

Using UTC in the database prevents issues around daylight saving time DST & much more.

> **[Always Use UTC Dates And Times](https://medium.com/@kylekatarnls/always-use-utc-dates-and-times-8a8200ca3164)**
>
> As soon as you handle dates or times, handle them in UTC.

---

<div class="post-metadata">

**Author:** ![knubbl](https://avatars.discourse-cdn.com/v4/letter/k/e9a140/32.png) [@knubbl](https://discourse.nodered.org/u/knubbl)\
**Post date:** [8 September 2020 07:26 UTC](https://discourse.nodered.org/t/dashboard-ui-form-date/32511/26 "2020-09-08T07:26:05Z")

</div>

Ok u r right.

Do you think its a good tradeoff to use two entries one for UTC and one for LT?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [8 September 2020 07:52 UTC](https://discourse.nodered.org/t/dashboard-ui-form-date/32511/27 "2020-09-08T07:52:19Z")

</div>

> [@knubbl](#):
>
> Do you think its a good tradeoff to use two entries one for UTC and one for LT

Yes, that I've seen and used that practice.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [22 September 2020 07:52 UTC](https://discourse.nodered.org/t/dashboard-ui-form-date/32511/28 "2020-09-22T07:52:20Z")

</div>

Closed on 22 September 2020 07:52 UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

[Previous page](https://discourse.nodered.org/t/dashboard-ui-form-date/32511.md?page=1)
