Can anyone tell me what to do about my date problem?
I have a calculation field that produces a date result. When I ask for the content of the field using the Data Viewer I see the date in the local format D/M/Y. However, when I pass the field content as a script parameter it is passed in US format M/D/Y.
In the Data Viewer I get these results:
GetAsDate( dateStart ) : 30/6/2011
GetAsText( dateStart ) : 6/30/2011
To test the value I can convert to a number and pass that to a date function
Month( GetAsNumber(Reports::Date Start) ): 6
To me that suggests that the date is being correctly stored so why does the conversion to text create this result:
GetAsText( GetAsDate(GetAsNumber(Reports::Date Start)) ): 6/30/2011
I became aware of the problem when I started to script a search on the date field. The script was throwing an error because the field would not accept the calculated string for the date range.
I'm using FMA v11.03 on Mac OSX 10.6.8
The application is running on FMS 126.96.36.1999 on Windows Server 2008