The CreatorCon Call for Content is officially open! Get started here.

comparison between different times

Shir Sharvit
Tera Contributor

Hey
How do I reverse the string - '18:00:00'
for the time 18:00:00
for comparison between different times.

 

Thanks. Shir

12 REPLIES 12

Zach Koch
Giga Sage

You can use the OOTB method of GlideDateTime(). Take a look at the linked page for different methods.

 

 

Here is a link to the docs
GlideDateTime docs 

 

If this information helped resolve your issue, please remember to mark response correct and thumbs up to help future community members on this information, thanks!

I tried but it doesn't work, can you help me with the solution please?

Ankur Bawiskar
Tera Patron
Tera Patron

@Shir Sharvit 

what's your business requirement here?

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

I need to convert the string '18:00:00' to a time
So that I can reduce the times
I need to subtract '18:00:00' from the time in the sys_updated_on field and check if it is greater than or equal to the value of the property I defined

 

ShirSharvit_0-1718716562460.png

 

@Ankur BawiskarWould appreciate help