how to include millisecond in data/time field

Sagaya1
Giga Expert

Hi,

I have a custom table and one of the filed is" transfer_date" and its field date/time. I need to insert date&time with millisecond . But while i pass the value [sample : 2020-09-28 10:15:01:33 ] it has stored as 2020-09-28 10:15:01 only and the millisecond value did not insert . Please help to resolve this issue.

 

Regards,

Sagaya.

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Sagaya

Since it is date/time type it will only hold year-month-date HH:mm:ss

It is not possible to store milliseconds into the Date/time field.

Regards
Ankur

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

View solution in original post

3 REPLIES 3

Harshal Gawali
Giga Guru

Hello Sagaya,

Check below links, these might help you.

getNumericValue() - Set a duration field value

glide.sys.time_format to include milliseconds

 

Regards,

Harshal.

DrewW
Mega Sage
Mega Sage

You are going to have to convert it to a numeric value and then store it as a number or string.

Ankur Bawiskar
Tera Patron
Tera Patron

@Sagaya

Since it is date/time type it will only hold year-month-date HH:mm:ss

It is not possible to store milliseconds into the Date/time field.

Regards
Ankur

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