How to get the time in along with the date in glide duration in the business rule.

Devi12
Giga Guru

Hi,

There is a business rule written on "sn_vul_vulnerable_item" table to calculate the business days. Below is the script for the same.

Devi12_0-1684474112503.png

It is an onBefore business rule. Currently it is calculating the target date only based on the field "last_opened_dt_tm". My requirement is to calculate the time also along with the date. How can I do that?

11 REPLIES 11

@Devi12 

whatever time you see for last opened data and you add days to it? what time you are expecting?

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

If the last opened date and time is "2023-05-19 17:05:00" then the target time should be "2023-05-29 16:04:59". It is calculating the date correctly but not calculating time.