- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2016 11:53 AM
Hi All --
I need some help. I cannot find a way to change my date format from sys to what is accepted by my integration. My customer only accepts mm/dd/yyyy but the system sets the date field as yyyy-mm-dd. This is within a scoped app, I do not and cannot affect global properties due to our other projects.
Is there any way i can do this, maybe just for this field in particular that is sent for the integration? Can I change a sys property for a scoped app?
thanks in advance
Solved! Go to Solution.
- 12,667 Views

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2016 01:02 PM
var gd = new GlideDate();
gd.setValue('2015-01-01');
return{
s.setStringParameter('u_actual_date', gd.getByFormat("MM/dd/yyyy")); //value of actual date
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2016 12:52 PM
You can use this on nay servere side script. And Yes you can use this in your business rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2016 12:58 PM
I'm not able to get it to work..
//setting the date values
var gd = new GlideDate();
gd.setValue('2015-01-01');
gs.info(gd.getByFormat("MM/DD/YYYY"));
return{
s.setStringParameter('u_actual_date', current.gd); //value of actual date
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2016 01:02 PM
var gd = new GlideDate();
gd.setValue('2015-01-01');
return{
s.setStringParameter('u_actual_date', gd.getByFormat("MM/dd/yyyy")); //value of actual date
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2018 10:15 AM
Hi Abhinay
for a catalog variable, the date format is "dd-mmm-yy" after selecting the date it should be visible as "dd-mmm-yyyy"
can you provide the code for this

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2016 10:36 AM
If this answered your question, please mark my response as correct so that it gets removed from unanswered list.