- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2023 01:33 PM
Hello -
In my Onboarding catalog item, I have a start_date variable that is auto-populated from an email from Workday.
That start_date variable field value appears as mm/dd/yyyy (shown here):
I have a script in the workflow (Workflow Editor) for each Catalog Task that generates, and appends the new hire's name from the New Hire's Name variable field to the end of the Short Desc (which is working as shown here):
I now want to append the start date from the start_date variable field, at the end of the Short Desc; however, the date is showing as yyyy-mm-dd and I'm not sure why (shown here):
This is what the script was:
task.short_description = "Onboarding - Equipment Request - "+current.variables.new_hires_name;
This is what I changed the script to:
task.short_description = "Onboarding - Equipment Request - "+current.variables.new_hires_name+" - "+current.variables.start_date;
NOTE:
I did check the 'glide.sys.date_format' system property and it is Active and Value = MM/dd/yyyy
Any guidance would be much appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2023 02:26 PM
Hi Roberta,
The value of a date field (current.date_field_name) will always be the system format of yyyy-mm-dd as you have discovered. To get the date display format try current.date_field_name.getDisplayValue()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2023 11:31 AM
Appreciate the suggestion @Sandeep Rajput! I used Brad's suggestion, as it was a simpler solution, and it worked.