Thank you for your post.
Get (CurrentTime) returns 12-hour AM/PM format under FileMaker Pro (Mac OS X Windows) and FileMaker Go (iOS), regardless how the Time field is formatted. I do not see an explanation for this reasoning, so I have asked for more information from our Development and Testing teams. When I receive any feedback, I will let you know.
a nasty work around could be to
- filter/substitute any "AM/PM" appendix in your "~Time" Var,
- set another Var
~corrective = IF ( PatternCount ( Get ( currentTime ) ; "PM" ) > 0 ; 12 ; 0 )
to use formula
Time ( Hour ( ~Time + ~corrective ) ; Minute ( ~Time ) ; Seconds ( ~Time ) )
Development has let me know that the format depends on the system where the file is created, and Set Field always sets data using the file’s format.
I can confirm, as I changed my system setting to 24-hour, and then created the database file and script. The script with Get (CurrentTime) puts the entry in the 24-hour format. If the file is already created, then use your existing workaround.
Thanks for the info, much appreciated.