Ideally, you should be storing the date/time as ctime always, and then converting it if you need to display it at some point. As you have discovered in your code, it is a nuissance to have to convert a dd/mm/yy hh:nn:ss time format whenever you need to perform calculations or comparisons. So, the easiest solution is to avoid the excessive conversions by using $ctime.

$ctime is simply a number that represents the number of seconds since Jan 1 1970. That is really all (or more) than you need to know. Simple comparisons are all you need when seeing if one is a certain amount larger or smaller than another. Example

if (%ctime.a > %ctime.b) echo ctime.b happened first

if ($calc(%ctime.a + 60) > %ctime.b) echo ctime.a happened at least 1 minute after ctime.b

etc.

-genius_at_work