With a little preformatting of your string representation of the timestamp, you can load it as an actual datetime value with ToDT (UTC) or ToDTTZ (specify time zone).
Creating Datetime Values
You would just need to remove the "T" an the milliseconds to be able to load it as a datetime value. You should be able to use StrPos and Substring to achieve this in a few steps:
String Operators
From there you can just use a basic condition to compare the two datetime values (<. <=, >, >=, ==)
If you are not familiar with handlers, I can create a very basic handler that takes as input a string value like you have and a datetime value and return a boolean if the string date is < the passed in datetime and sharethat via github, just let me know.
------------------------------
Aaron Lael
State of Utah - comments on this forum reflect my own personal opinions\observations and are separate from any entity I am otherwise involved in.
------------------------------
Original Message:
Sent: 05-06-2022 08:21
From: Pavel Broska
Subject: Compare Dates in handler
Hi All,
I'm strugling a little bit with comparing Dates in handlers. The goal si to list all interactions in particular queue and evaluate interactions, which Eic_WorkgroupQueueTimestamp is less than defined date/Time. E.g. lower than x minutes or days. Review IDesigner help and there are a couple of functions for compring ones but not sure what date format to use. Based on attributes.pdf mentioned parameter has format:yyyymmddThhmmss.fffZ but what format should have comparing date?
E.g. list all interactions which are older then 28 of february.
What is best approach solve this task?
Does anybody already solved it?
Thanks for tips and help
Pavel
#Handlers
------------------------------
Pavel Broska
Alcasys Slovakia a.s
------------------------------