ITSM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2024 02:14 AM
I have one date time field which is in format "01/27/2024 15:40:20" and i want it to show like "2024/01/27 15:40:20"
How to achieve this
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2024 02:32 AM - edited 01-27-2024 02:33 AM
Hi @ayushigupta9 ,
U can try below code
var date= new GlideDate();//replace new GlideDate() with the incoming date
var date2 = date.getByFormat('yyyy/MM/dd');//now use the date2 to set the field value
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2024 04:07 AM
Hi
What do you mean by incoming date?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2024 03:44 AM
Hello @ayushigupta9
Kindly check the logic applied in this solution and modify it as per your requirement
Thanks,
Sarthak