how to remove time value in the date

siva58
Tera Contributor

i have twi fields with name 1. start date 2. end date in the employee table

when i select the date it also capturing the time.

find_real_file.png but i need date only.like below

find_real_file.png

can any one help me with the exact solution 

10 REPLIES 10

As shown in the screenshot, we have the Date type for dictionaries, not sure why it is visible for you.

You have to create a new field and add this, if you are planning to only show date on a datetime field, I don't think this will work, you need to have Date type field

 

Feel free to mark correct, If I answered your query.

Will be helpful for future visitors looking for similar questions 🙂

Best Regards
Aman Kumar

Hi Siva,

                there is date data type present while creating field. Try to add new field by right-clicking on header configure ⇾ form layout, you can check in create new field like below

 

Hitoshi Ozawa
Giga Sage
Giga Sage

Hi Siva,

Is this a Service Catalog form? If it is a Service Catalog, follow steps (A). If not, follow steps (B). 

A. If it's a Service Catalog form, open the Catalog items page.

  1. From Application Navigator, go to "Service Catalog" > "Maintain items".
  2. Select the catalog item that contains the form
  3. Go to the bottom of the page. There should be tabs with "Variables". Select this tab. There should be a line with "start date" and "end date".  
    find_real_file.png
  4. Select "start date". Click on the down arrow in "Type" field. "Date" should appear.
    find_real_file.png
  5. Select "Update" button to save the change.
  6. Do the same with "end date".

B. If the form is not a Service Catalog, do the following steps.

  1. Open the form.
  2. After the form is opened, right click on the icon with 3 horizontal bar at the top left corner of the form and select "Configure" > "Dictionary"
    find_real_file.png

  3. Search on "Column label", "=start date" and select the record that is displayed. In the following example, I'll click on "Incident" but this will be the name of the table that form is based on.
    find_real_file.png
  4. Click the magnifying glass icon to the right of the "Type" field.
    find_real_file.png
  5. Search on "Label", "=Date" and select the "Date" row that is displayed.
    find_real_file.png
  6. Check that type changed to "Date". Select the "Update" button to save the change.
    find_real_file.png
  7. Do the same with "end date".

 

shloke04
Kilo Patron

@siva

Screenshot shared by you looks like a Backend Native form to me. Assuming it's a Native form please follow the suggestion below to achieve your requirement:

1) Change your Start and End Date from Date Time to Date field.

Note: Date is a OOB available Field Type and will be available for you. In case if it is not available then the reason might be because the Fields you are having as "Start/End Date" might already have data present in those fields for any existing records.

If data is present Servicenow will not allow you to select or modify the Field type from Date/Time to Date.

Proposed Solution:

1. Create two Temp Field(One for Start and other for End Date) on your Employee o respective table

2. Copy the Data from Start and End date field to these new Temp fields

3. Once you have the data copied, clear the Data from the existing fields

4. Now change the Type of Field from Date time to Date

5. Now Map back the Date value for existing record from those Temp fields to your existing field after the Field Type is changed so that there is no data loss for existing record as well

6. Delete those 2 Temp fields created.

 

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

 

 

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

what's the issue in using date field ?

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader