How to sum up two date time objects?

Community Alums
Not applicable

Hi everyone,

I am building a metric definition and I want to sum up the time worked field for a specific customer. When a maximum amount of time worked is reached, the system sends a notification.

How can I sum up two or more GlideDateTime objects? Any ideas?

Can't find any API for it.

Thanks

 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

 

you cannot add 2 glide date time values

you can add months, days, years, duration etc to glide date time

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

View solution in original post

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

 

you cannot add 2 glide date time values

you can add months, days, years, duration etc to glide date time

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

Community Alums
Not applicable

Hi Ankur,

Thanks for your feedback.

I believe you are right, we cannot add two glide datetime values.

Hope this becomes possible in future.

Thanks!

Kind regards

Jaissica

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

Any update on this?
Can you mark my answer as correct, 👍 helpful if you were able to achieve the requirement. This helps in removing this question from unanswered list and helps users to learn from your thread. Thanks in advance.

Regards
Ankur

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