GetAsTime ( 2759 ) = 2759:00:00
GetAsTime ( 2759,0 ) = 00:45:59
(I am on a European machine, so "," is the decimal separator)
Thank you for your post.
I am unable to reproduce the issue with FileMaker Pro 16 under macOS Sierra 10.12.5. GetAsTime (2759) always returns 00:45:59. I have tried this under German and Swedish systems. Please let me know more about your computing environment.
thanks for your quick reply, you are right it is not 100% true, I parsed it from a JSON response, which is of course text. The correct test case is:
GetAsTime ( "2759" ) = 2759:00:00
GetAsTime ( "2759,0" ) = 00:45:59
In the Help for GetAsTime, the parameter needs to be "any text expression or text field containing a time". Since neither of your text strings is in a time format, you will get unexpected results. The first string ("2759") returns 2759:00:00 as expected, while the second text string, since it contains a decimal point, will be evaluated as a number returning 0:45:59.
If you want to return 00:45:59, then use GetAsTime ( Evaluate ( "2759" ) )
I really understand what you are saying, but it is a weird behaviour in my
opinion as well
Retrieving data ...