OK. I am trying to figure out how to check when a date/time is between 3am and 5am. What do I look for? I don’t need to use the date, so it doesn’t like I would use a datetime field.
What should I use? And how would I check the time between them, I don’t think I would put if x>3:00 AM and x<3:00 PM.
Subject: Time difference
In formula language just compare the time values:
@If(@Time(testval) >= [03:00 AM] & @Time(testval) < [05:00 AM]; …
In script, the easiest way would be to use the Hour (integer):
testtval = Cdat(whatever)
If Hour(testval) = 3 Or Hour(testval) = 4 Then
…
If you’re looking at the current clock, use “@Now” in formula, “Now” in script instead of testval.
Subject: Time difference
Math operations that do not have a ‘between’ will have to use two inequalities equation.
Subject: RE: Time difference
But this isn’t a question about math, this is a question about using the datetime object, or what I should use, not about the inequalities.
Subject: RE: Time difference
You asked how do I do it without doing x>3AM.
Time difference is going to give the difference of the time in seconds . Those differences are going to be compared to something right?