- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2023 07:32 PM
Hello,
I'm currently encountering an issue where the date displays on the ritm description like this:
The date value comes from date variable in the flow designer:
I need help on switch it from 2024-06-30 to 06-30-2024 format.
Thank you
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2023 10:50 PM
Hi @Erica2
Try the script below.
var dt = fd_data._1__get_catalog_variables.recording_ends_date;
var gd = new GlideDate();
gd.setValue(dt);
return "Recording on:" + gd.getByFormat('MM-dd-YYYY');
Please mark my answer helpful and accept as solution if it helped 👍✅
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2023 10:27 PM
Thank you for sending the video. However, after viewing the video, I'm still did not get it.
How do you make it work using the follow code?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2023 10:56 PM
@Erica2 GlideDate can not be initialised this way, you need to use setValue() on the object. Please see my another reply for the full script.
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2023 10:56 PM
try script shared by Anvesh
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader