AnsweredAssumed Answered

GetAsText(date) BUG

Question asked by KSP on Feb 3, 2010
Latest reply on Feb 10, 2010 by TSGal

Summary

GetAsText(date) BUG

Description of the issue

FMP 9 or FMP 10GetAsText(date) returns the date in the format when the file was created. It disregards the filesettings->Text-> "use system date format" How to reproduce:Close FMP-Set PC region date format to USA  (M/D/Y)- Open  FMP- Create new DB, add field1 of type date, add field2 as a calculated field "GetAsText(field1)"           Any date (M/D/Y) entered into field 1 will be displayed in field 2 (M/D/Y) using the calculation.-Set File Options->text->Use system settings so the file will use the PC date settings.-  Close FMP- Change PC region to be a country with (D/M/Y) , ie Australia- Open FMP, Open File- Enter a date into field1 (this time with order D/M/Y) It enters fine as D/M/Y, ie 20/1/2010, which would throw an error if the date region setting was wrong.Notice that field 2 shows the date as (M/D/Y)  This is NOT the same as some FMP functions that always return in the order M/D/Y. If you make a new file when the PC settings are D/M/Y the calculation will return D/M/Y It seems that GetAsText  uses the date format at file creation only and ignores the date settings in FileMaker. This is a problem since we use this function to make complex date range find requests.   

Outcomes