Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2022 10:42 PM
I am trying to set the field in yyyy-mm-dd format but it is giving me undefined value.
var date = "20.10.2018";
var dt = new GlideDate(date);
var dt3 = dt.getLocalDate().getByFormat("yyyy-MM-dd");
gs.print("Date :" + dt3);
Thanks in advance!
Solved! Go to Solution.
1 ACCEPTED SOLUTION

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2022 10:53 PM
Try this
var date = "20.10.2018";
var dt = new GlideDateTime(date);
var dt3 = dt.getLocalDate().getByFormat("yyyy-MM-dd");
gs.print("Date :" + dt3);
Regards
Harish
Harish
5 REPLIES 5

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2022 12:14 PM
Thanks Shwetha..
Please Mark ✅ Correct/helpful, if applicable, Thanks!!
Regards
Sulabh Garg
Regards
Sulabh Garg