There's a flaw in your original idea of eliminating the comma from two $H-format timestamps and then comparing them with the "greater than" operation. For most of a 24 hour period the resulting $TR(dollarH,",") is 10 digits long, but from midnight until 00:00:09 it is only 6 digits long, from 00:00:10 to 00:01:39 it is 7, from 00:01:40 to 00:16:39 it is 8 and from 00:16:40 to 02:46:39 it is 9 long.

A working alternative would be to compute $P(dollarH,",")*86400+$P(dollarH,",",2) for each and compare the results, which are the number of seconds since midnight at the start of 31st December 1840.

if you need to compare a $H-format timestamp against the current time don't use $P($H,",")*86400+$P($H,",",2) as one of the expressions because there's a small possibility that your two fetches of $H will fall either side of midnight. Instead, fetch $H once, store it in a variable, then process that variable.

Laura, this probably deserves to be posted as a new question so more people will see it. But your situation isn't clear to me. If a user can't log in (why?), how are they going to be able to run something that will log out all their sessions?

I also recommend the use of the "comment" link that appears under questions, answers, or other comments. I think this helps put a response into the relevant context.

Like most DC posts nowadays, this one got auto-crossposted to the intersystems-public-cache Google Group. When I checked this morning there were 5 responses from people trying to help the original poster. But since those answers don't automatically feed across to DC I'm drawing attention to them here. Because unless the OP knows to look there they may never see them.

https://groups.google.com/forum/#!topic/intersystems-public-cache/fngd5j...