- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2016 05:25 AM
Hi Experts,
I have a Date/Time field as below:
I only require Date to be fetched from this field using client script.
Could anyone pls help?
Thanks,
Rathika
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2016 05:30 AM
My recommendation would be to parse the display value of the object. You should be able to do this with a clever split() method.
If that's not an option, use a GlideAjax operation to send the date time to the server, parse it there, convert it to a date object and send it back.
something like this. WARNING: Untested code!
var dateTimeStr = g_form.getValue('u_date_time');
var dateArr = dateTimeStr.split(' ');
var date = dateArr[0];

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2016 01:52 AM
You are welcome. Please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.
If you are viewing this discussion from your "inbox", use the "mark as correct" option under actions. If you are viewing it directly from the thread use the Correct Answer link (red with a star).
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2019 09:42 AM
but it split[0] only gives only 0th indexed element in split array
eg :- if it is 19-02-2019
it replies only 1
how can we get entire date field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2019 03:45 AM
The script he provided did a split on space, so it gives you the entire date, not just the first digit.