Comparing time values in Display Logic | XM Community
Skip to main content

hi,

Just found this NEW issue and thought I’d share it.  I have a form that is only “available” from 9 PM to 1:30 AM.  I want users that open the form during the day (between 1:30 AM and 9 PM) to see a message (text graphic question) that says it’s not available until 9 PM. 

SO, I used display logic after first capturing the time: ${date://CurrentTime/MT} in an embedded data field. When I compared it (we’ve been using it for a long time - years) I compared it using the following Display Logic:

Display if CapturedTIME was greater than 1:30 and if CapturedTIME was less than or equal to 21:00.  But today we found that this no longer worked properly.  After some troubleshooting (the fun part), we found that the end time was working in comparison but NOT the start time (1:30).  Through trial and error we found that we have to add a leading zero to the hard-coded comparison value of 1:30.  So when we use display logic and compare to 01:30 it worked.

 

Hope this helps others. 

Be the first to reply!

Leave a Reply