# Converting the Date to UTC Format

**URL:** <https://forum.inductiveautomation.com/t/converting-the-date-to-utc-format/57574>\
**Category:** Ignition\
**Tags:** ignition80, database, perspective\
**Created:** [March 24, 2022, 4:30am UTC](https://forum.inductiveautomation.com/t/converting-the-date-to-utc-format/57574 "2022-03-24T04:30:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arun\_Teja\_Gattu](https://avatars.discourse-cdn.com/v4/letter/a/c6cbf5/32.png) [@Arun\_Teja\_Gattu](https://forum.inductiveautomation.com/u/Arun_Teja_Gattu)\
**Post date:** [March 24, 2022, 4:30am UTC](https://forum.inductiveautomation.com/t/converting-the-date-to-utc-format/57574/1 "2022-03-24T04:30:59Z")

</div>

Hi,  
I have a Date Component in the perspective and whenever I am saving the Date to database it was adding some extra hours and saving it. So, I thought to convert the Date to UTC Format and then upload to Database.  
So is there any options or scripts in perspective to convert the date into UTC Format.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![cconnor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cconnor/32/33235_2.png) [@cconnor](https://forum.inductiveautomation.com/u/cconnor)\
**Post date:** [March 28, 2022, 9:57pm UTC](https://forum.inductiveautomation.com/t/converting-the-date-to-utc-format/57574/2 "2022-03-28T21:57:45Z")

</div>

To convert a Date to a UTC timestamp in milliseconds, use system.date.toMillis: [system.date.toMillis - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/system.date.toMillis)
