compare 2 date time values with milliseconds

i want to compare 2 date time values with milliseconds, but date object only has seconds precision, not milliseconds
for example ->

if 2019-05-30 16:26:45.108 > 2019-05-30 16:26:45.103 then msgbox "hi!" end if

Like some wine, this will improve with time. :wink:

did you compare totaleseconds properties of the dates?

The namespaced framework date object has more precision. The docs read like they didn’t put much effort into the operator compare for us, so you’ll have to roll your own. But you have access to the nanoseconds. http://documentation.xojo.com/api/deprecated/xojo.core.date.html

dates does not have milliseconds precision. how do i convert 2019-05-30 16:26:45.108 into totalseconds ?

@nicols canessa TotalSeconds is actually a Double, so you can have fractions of a second

d.SQLDateTime = "2019-05-30 16:26:45" d.TotalSeconds = d.TotalSeconds + 0.108