Converting time zone of dateTime field and saving it in another field within a workflow

Avatar

Avatar

marcinkacz

Avatar

marcinkacz

marcinkacz

28-01-2019

Hi,

I built custom data schema in order to collect and export selected records from nms:trackingLogRcp and nms:broadLogRcp. One of the column is DateAndTime. It contains eventDate (if record comes from broadLogRcp) or logDate (if record comes from trackingLogRcp). Before export this data I would like to change time zone of DateAndTime field and save it in DateAndTime2. I can do it by using loop in JavaScript activity and formatDate method and xtk.session.Write(). Unfortunately this solution is very time consuming. Processing of 1000 records takes around 5 minutes.

Do you know more efficient approach? Maybe some SQL script will help or some batch process?

Thank you,

Marcin

View Entire Topic

Avatar

Avatar

marcinkacz

Avatar

marcinkacz

marcinkacz

31-01-2019

Thank you All for your tips. FYI I decided to use simple approach: choose proper time zone in workflow's properties. With this settings time is converted into desired time zone directly in Data extraction (file) activity without any additional code (so I'm not saving it in temp table).

Venu, I have additional questions to your post:

- What is this option name?

- How properly use  'Taken into account if' ?

Thank you,

Marcin