ServiceNow Learning 57: Handling duration type field in APIs (OOB and Custom)
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 08:48 AM
Hi All,
When you get the duration field backend value in OOB Table API then it gives this result:
1970-01-01 00:00:00
When you get the duration field backend value by using below script: current.<duration_field_name> then it gives same result.
1970-01-01 00:00:00
When you get the duration backend field value by using this script: current.<duration_field_name>.getDisplayValue() then it gives this result.
32 minutes
So, you have to use different function in order to get different results.
Hope it helps.
I hope this article helpful. Please mark it as helpful and bookmark if you like it.
Regards,
Shamma
Regards,Shamma Negi
0 REPLIES 0