Date/Time fields display as Date Only

garyopela
ServiceNow Employee
ServiceNow Employee


Hey, is there a quick and easy way to get a Date/Time field to display as Date only? I don't need the time. I know I can change the type of the field from Date/Time to Date but that causes the column to be dropped and rebuilt, thus losing all the data.

 

Just thought I'd check to see if any of you all saw how to. This is mainly to be used in a report, so on the report I would need it to show date only.

5 REPLIES 5

Jacob_Andersen
ServiceNow Employee
ServiceNow Employee

Gary,



If date is the only thing you need, then you probably ought to consider changing the field type.   Doing this will not only allow you to report on it correctly but it will also make it more intuitive for your users to fill out the field (if time is not a relevant component).



A simple way to do this would be to export the records to XML.   Then change the field type.   Finally, import your xml records.   It will set your date field correctly (as it was before) and drop the time.


Mark Stanger
Giga Sage

No way to do this as far as I know.


garyopela
ServiceNow Employee
ServiceNow Employee

Okay, thanks guys. I've done the export/re-import before for this same reason, but wanted first to check and make sure there wasn't something different. Thanks as always!


epam
Kilo Guru

To make it display only Days - you may want to set Read Only field property in Dictionary,



it will be available to change its value only via Server-side scripts however.