I am doing some gyrations with times in Filemaker and just want to clarify a few point before I code myself into a corner.
This script produces different results:
Set Variable [ $$EndTime; Value:Max(schedule_HAUL|Truck00|::StartTime) ]
Set Variable [ $$LocalTime; Value:Schedule::_gzStartTime ]
StartTime is a time field in a related tale.
_gzStartTime is a global time field in the local table. The value is set from a menu with hardcoded "times" in it (for the user experience)
$$EndTime yields "18:00:00"
$$LocalTime yields "6:00 PM"
So I tried this: Set Variable [ $$LocalTime; Value: getastime(Schedule::_gzStartTime) ]
$$LocalTime yields "6:00 PM". I was sort of expecting "18:00:00" or perhaps 64800 (would be ideal).
So I tried this: Set Variable [ $$LocalTime; Value: getasnumber(Schedule::_gzStartTime) ]
$$LocalTime yields "64800". Perfect.
Set Variable [ $$LocalTime; Value: getasnumber("7:00 PM) ] rather predictably yields 700. Which is of little use here.
So, s this the best way to handle time comparisons - boil the time fields down to component seconds?
"Time moves in one direction, memory in another." --- William Gibson