- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2020 10:42 PM
Hi,
I have a requirement to populate the value of one catalog variable in "DD-MM-YYYY" format. This will happen based on a change in another catalog variable which is in "YYYY-MM-DD" format. I have written a catalog client script and a script include but the date format is not changing. It will be of great help if you suggest something on this. Am I missing something?
Client Script
Script Include
Output
Thanks,
Rajarshi
Solved! Go to Solution.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2020 11:37 PM
Try this-
After line 9
var formatdate= day.getByFormat("dd-MM-yyyy");
return formatdate;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2020 10:57 PM
Hi Rajashri,
Try below changes-
In your script include,
Use- return day.getDisplayValue(); instead of return day.
Comment the line- day.getByFormat('dd-mm-yyyy');
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy.
Thanks,
Ruhi.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2020 11:07 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2020 11:15 PM
Try this-
return{
s.setStringParameter('fieldname', day.getByFormat("dd/MM/yyyy"));
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2020 11:30 PM
No Luck Ruhi!!