- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-02-2016 11:17 AM
Hi all,
Need to some help to set value received in a string field with format mm-dd-yyyy to date field(not datetime field). Can anyone help here. I am setting this value in variable of catalog item.
Thanks in advance.
Richa
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-02-2016 12:12 PM
Here you go. use this in a server side code
var usr= new GlideRecord('sys_user');
usr.get(gs.getUserID());
var gd=new GlideDate();
gd.setDisplayValue(your date value);
current.<your date field name>=gd.getByFormat(usr.getValue('date_format'));

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-03-2016 07:02 AM
Glad you got your question answered.