Help with the date/time field, value not same as the value passed in service catalog form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-31-2022 07:55 PM
Hi,
I am trying to pass Date/Time value from a Service Catalog. The field data type is Date/Time with Date/Time picker.
And I had a workflow, where I am passing the date/time value to a script activity in the WF.
var catdatetime = current.variables.select_date_time_gmt;
var insDate = new GlideDateTime(catdatetime);
And when I pass 2022-03-30 01:00:00 like this,
I am receiving it as 2022-03-30 06:00:00. How can I get the same value that I pass from the catalog request form?
Tried with several options but I am still seeing the diff in what was passed. Can someone shed some light on this please?
Many thanks in advance.
Thanks
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2025 12:15 AM
Hi,
Use getDisplayValue('date_time_field') along with a 5-second timer before running this script. Regardless of the user's timezone, the workflow retrieves the date and time in the system timezone.