Using European Date Formats in the "Format as Text" Report.
FileMaker's built in system formats can handle most date conversions, making it very easy to use CCTime under other date formats: FileMaker just understands the date formatting of your machine.
However, the GetAsText() function does not respect the system date formats. So, when we use this function in our "Report Time as Formatted Text" routine, you see the date according to the system formats of the machine that created the file. There are two ways around this.
The first is to "create" the file on your machine. This can be done by Saving a clone of the file- this action resets the file's internal date format. Unfortunately it also removes all your data (and all our interface graphics) which would then have to be reimported.
A second approach would just replace the GetAsText() used in our script with something that explicitly reordered the dates to the format you requested. This is probably easier...
If you edit the script " Format as Text - User Specified Break Field" in CCTime, you'll see three occasions where we set the field Filter::GlobText2. Each of those instances contains a GetAsText() function. In each case you can select the string "GetAsText(SearchTimeRecords::TimeDate)" from the calculation and replace it with this:
- Let ( td= SearchTimeRecords::TimeDate ; right ( "0" & day ( td ) ; 2 ) & "/" & right ( "0" & month ( td ) ; 2 ) & "/" & year ( td ) )
This formats the date as DD/MM/YYYY and will give you a leading zero for single digit months and days--which can look better on our report. If you don't want the leading 0, just delete it from within the quotes (but leave the quotes). Remember, you have to do this each of the 3 times we set the field Filter::GlobText2 in this script.
Hope that helps.