- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a week ago
There is feild in staging table called created , which is in mutliple formats like GMT , IST etc..
before inserting the data into target table , need to change created on every record to IST
Can someone help how can i approach this one.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Saturday
Hi @naveenvenka ,
You need to use a Transform Script for this. In the onBefore Script, check the source record’s timezone and then convert it into the required timezone before inserting into the target table.
Thanks,
Pradeep
Regards,
Pradeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Saturday
Hi @naveenvenka ,
You need to use a Transform Script for this. In the onBefore Script, check the source record’s timezone and then convert it into the required timezone before inserting into the target table.
Thanks,
Pradeep
Regards,
Pradeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Saturday
Hi @Pradeep Thipani ,
Thanks for answering the question , but my main aim to get the logic in the form of code.
Can you please give in the form of code if its possible.
Really apperciate your efforts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Saturday
Create onBefore transform script to convert staging field 'created' to IST timezone and insert to target table as part of transform mapping.
You can refer below thread to convert date-time field to IST timezone.
https://www.servicenow.com/community/developer-blog/convert-timezone/ba-p/2287262
As per community guidelines, you can accept more than one answer as accepted solution. If my response helped to answer your query, please mark it helpful & accept the solution.
Thanks,
Bhuvan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
Did you get a chance to review this ? Reference I provided has the code that you can use in onBefore transform script.
As per community guidelines, you can accept more than one answer as accepted solution. If my response helped to answer your query, please mark it helpful & accept the solution.
Thanks,
Bhuvan