convert Date/Time field value into UTC based on the login User timezone
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2022 10:35 AM
I have a change record form where Planned start date and Planned end date fields are Date/Time fields. Now, once the change form submits then I want to convert these 2 fields into UTC time.
For this requirement, I have created 2 new String Type fields to store UTC time. And tried creating BR, but it's not working for some reason.
Could anyone help me here to help me out.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2022 10:44 AM
Hello,
You don't need to covert any time as UTC is the system backend time zone.
So all you need to do is use something like:
var date1 = current.getValue('date_time_field');
And now date1 has the date/time in UTC format. If you want to then display this in those custom fields, if that's important to you, then you can use:
current.u_utc_field = current.getValue('date_time_field');
Replace the field names above as necessary. The examples above would be use in "before" Business rule.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2022 10:12 PM
yes, This one I have already tried. It's working fine for newly created records.
But I want to try this UTC conversion for the existing records as well. where UTC fields were not there before.
I am using FIX Script to update the existing records.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2022 07:36 AM
Hi,
You can use the same thing above. If the planned start date field, for example, has a value, then you can use the same approach to get the value of that field and then place it in your new field.
Again, the main point here is that the date/time of a field that already has data in it, has a display value for the user's timezone, and then a backend system value that is in UTC. So it's already there in UTC and if you're wanting to display that UTC to the user, then you'd get the value of the current date/time field and put it in your other field (using approach I've mentioned above).
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!