How to Format Date in UTC for Email Template iCalendar File?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 03:19 AM
Forum Post Title: How to Format Date in UTC for Email Template iCalendar File?
Hi everyone,
I'm currently working on an email template in ServiceNow that requires populating an iCalendar file. My challenge is with the date formatting. The date variable I'm receiving is in Central European Time (CET), but I need to format it into Coordinated Universal Time (UTC) within the Message Text Box of the email template.
Has anyone had experience with converting date formats, specifically from CET to UTC, within the context of an email template? I'm looking for guidance on the best approach to ensure the date displays correctly in the iCalendar file.
Because , I already search on the web and support case but doesn't have a lot of documentation regarding ICalendar file . I have a sys_impex_map but it doesn't work and try with email scripting .
Any tips, code snippets, or references to relevant documentation would be greatly appreciated!
Thanks in advance for your help!
Best,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 04:31 AM
Hi @ericlung
We had similar issue of GMT and BST and in same area where you stuck. My dev team did this but it was like very hard code they did and it is not straight format.
Alternative you can show both time zone.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 05:12 AM
Hello Tera ,
Thank you but I can explained in details how you solved ?
Because , I try to code it but is like you say is some hard code .
What do you mean : "Alternative you can show both time zone" ?
Kind regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 05:21 AM
Hi @ericlung
I am not a dev and not working my old guys now s, so dont have any script here.
What do you mean : "Alternative you can show both time zone" ?
We added another line in email to GMT+ hr (UTC) so that user can understand.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************