Behavior of Date Time field when fetched in JavaScript using Query Def

Avatar

Avatar

SriBhargav94-go

Avatar

SriBhargav94-go

SriBhargav94-go

19-02-2019

Hello Folks,

I am trying to fetch a date time field from the Additional Data of Query activity in JS. I am using a queryDef for doing the same. But however i observed weird thing that value fetched is not same.

I am trying to fetch Event Date from the delivery schema for a particular delivery and value is 1/31/2019 05:58:45 AM. However if i log the same in JS after fetching it. I am seeing it as 2019-01-31 10:58:45.059Z. It is coming in different pattern (i can change it later) and with time zone (i can truncate it). But look at the time it is 10:58:45 instead of 05:58:45

I tried with today's date too, instead of showing 2/19/2019 02:54:51 AM it is showing as 2019-02-19 07:54:51.547Z.

Would like to understand what is happening behind the scenes. Is it something to do with Time zone set in workflow properties?

Regards,

Sri Bhargav

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

SriBhargav94-go

Avatar

SriBhargav94-go

SriBhargav94-go

03-04-2019

Thank you David!

Answers (2)

Answers (2)

Avatar

Avatar

DavidKangni

MVP

Avatar

DavidKangni

MVP

DavidKangni
MVP

01-04-2019

the parser is just different when you're using javascript or an extract/delivery

Re: How to display date and time in UTC format i.e, 2018-05-02T13:47:33.743Z?

You have to play with newDate function options to match the date

Avatar

Avatar

SriBhargav94-go

Avatar

SriBhargav94-go

SriBhargav94-go

30-03-2019

Folks, Could someone please provide any pointers on this

Regards,

Sri Bhargav