
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2020 05:04 PM
Hi guys, I need to change the date format when I consult a incident using an API
I've already changed the format on the plataform. to dd/mm/yy but when I consult the format is dd-mm-yy.
Result API:
Can you help?
Thanks
Gustavo Petta.
Solved! Go to Solution.
- Labels:
-
Platform and Cloud Security

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2020 06:01 AM
Hi Asifoor
I resolved this issue using another parametter on API and configuring the format on instance.
Thanks to your help.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2020 10:25 PM
Hello Gustavo,
You can change the format of the date using the below function.
var gd = new GlideDate();
var gdt = new GlideDateTime(result[i].sys_created_on).getDate();
gd.setValue(gdt);
gs.info(gd.getByFormat("dd/MM/yyyy"));
Mark the comment as a correct answer and helpful if it helps.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2020 06:01 AM
Hi Asifoor
I resolved this issue using another parametter on API and configuring the format on instance.
Thanks to your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2022 05:25 AM
Hi Gustavo, I am facing a similar situation. Planned start date in DD/MM/YYYY format coming in via Rest API is getting set as MM/DD/YYYY thereby showing errors.
Do you remember how did you make it work? Whats the parameter you are using in your API to convert date-time from US to European format?
Thanks,
Anik.