Help with the date/time field, value not same as the value passed in service catalog form.

Raj76
Tera Contributor

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 

5 REPLIES 5

bsiva4567
Tera Contributor

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.