Remove time from date/time field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2017 10:32 AM
I want to remove the time from a date/time field that is already existing. It looks like I cannot change the field type to just "date". However, I dont want to deactivate the field or have to create a new field.
Is there a way I can add an attribute to the field so it doesnt display the time?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2017 10:36 AM
Hi Josh,
You will have to write onchange client script to remove time from date/time field.
Please refer below post for code and modify according to your requirements.
How do you remove time from date field?
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2017 10:45 AM
Hi Sachin,
That post doesnt look like its about hiding the time part of the field.
Thanks,
Josh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2017 11:50 AM
Hi Josh,
You can use below code to just get date and update in your date/time field.
var dateTimeStr = g_form.getValue('u_date_time');
var dateArr = dateTimeStr.split(' ');
var date = dateArr[0];
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2017 10:52 AM
Hi Josh,
The only thing I'm aware of what you can do is zero out the time.
You can trim down the date like this:
g_form.setValue("your_date_field", g_form.getValue("your_date_field").split(" ")[0]);
but you won't be able to save it as it violates the type of the field.
Regards
Greg