- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-17-2019 11:09 PM
I want this date in DD/MM/YYYY format to show on portal
Solved! Go to Solution.
- Labels:
-
Delegated Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-17-2019 11:24 PM
Hello Amol,
If you want to get the date in this format (dd/mm/yyyy) to show on SP, then return the date from the backend like this
var gdt = new GlideDateTime("2019-11-14 12:33:50");
var myDate = gtd.getDate();
var gd = new GlideDate();
gd.setValue(myDate);
gs.info(gd.getByFormat("dd-MM-yyyy"));
Mark the comment as a correct answer and helpful once worked.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-17-2019 11:16 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-17-2019 11:17 PM
Also, check this link for additional information -
Regards
Omkar Mone

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-17-2019 11:17 PM
Hi there,
Could you clarify your question a bit? Where/when do you want to do this? Is this on a widget? On a Catalog Item presented? Is this onChange retrieving some values? Etc..
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-17-2019 11:24 PM
Hello Amol,
If you want to get the date in this format (dd/mm/yyyy) to show on SP, then return the date from the backend like this
var gdt = new GlideDateTime("2019-11-14 12:33:50");
var myDate = gtd.getDate();
var gd = new GlideDate();
gd.setValue(myDate);
gs.info(gd.getByFormat("dd-MM-yyyy"));
Mark the comment as a correct answer and helpful once worked.