Remove time from date/time field

brostoff17
Tera Contributor

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?

Capture.PNG

13 REPLIES 13

Luis Franco
Mega Expert

Hi, Experts.

I'm testing New York ppm and there is a Project Schedule Date Format which gives an option of only Date instead of date/time format.

 

I'm checking it now to see if it is ok. I have an issue with dependencies with milestones because the milestones move to the next business day and I would like to have them on the same day has the previous task.

 

Best

Sean Hamilton
Giga Expert

Honestly,

ServiceNow really needs to address this.  Such a simple request, a date format that every other application on the planet supports, and we need to customize?  Silly.  I'm going to look for a HI enhancement ticket and if one doesn't exist, it will.

Sean

Hi Sean,

Do you have any update maybe on this topic?

Thanks and regards,

Attila

Wendy12
Tera Contributor

As an addition to lks's post above:

 

// date to string

var stringDateOnly = abc.toString().split(" ")[0];

// where variable abc contains the Date/Time to be shortened to Date only.

 

Result:

<Information Message Here> on 2019-05-08, Action is required.

 

Passed the variable from a client script to the script include, got the date and passed it back in a comment for client viewing. works well