Issue in GlideDate format in scoped application

sasikanth1
Tera Contributor

Hi @Ankur Bawiskar ,

 

We have a requirement where we need to calculate the difference between two date/time fields and the answer should populate in another duration field

 

Here, we are using client script and script include

In client script we are getting the values of the date/time values as (dd/mm/yy hh:mm:ss) eg:start date29/06/2022 13:24:12, end date: 31/10/2022 13:24:12 format but when in script include it is taking as (yyyy/mm/dd 00:00:00) eg: 2022-06-29 00:00:00, 2022-10-31 00:00:00

 

But when i tried to change the format of start date on form as " 06/29/2022 13:24:12" then it is taking as "2022-06-29 13:24:12" and populating the exact duration value in duration field

 

Note: We are using GlideDate time in script include and we are calculating the difference of start date and end date as "GlideDateTime.Subtract(start date, end date)"