lpm Posted September 20, 2007 Posted September 20, 2007 Is there a way to have a merge field (type = date) formatted depending on if the system date is on USA or Europe standard? I'd like to have this merge field format as mm-dd-yyyy if USA and dd-mm-yyyy if Europe. Also is there a get function that will tell if the system is USA or Europe? TIA
comment Posted September 20, 2007 Posted September 20, 2007 You can set the file to automatically use the local OS date format (under File Options > Text). However, this will not affect date fields that have been custom-formatted. There is no function to get the actual system formats. There is Get(UseSystemFormatsState), but that only tells you if the file is using the OS formats or its own. But it is quite easy to reveal the date format that a file is currently using by a calculation (result is Text) Substitute ( GetAsText ( Date ( 1 ; 2 ; 3 ) ) ; [ "01" ; "mm" ] ; [ "1" ; "m" ] ; [ "02" ; "dd" ] ; [ "2" ; "d" ] ; [ "0003" ; "yyyy" ] ; [ "03" ; "yy" ] ; [ "3" ; "y" ] )
lpm Posted September 20, 2007 Author Posted September 20, 2007 Thank you Comment, I'll give it a try! Cheers!
Vecordious Posted October 31, 2007 Posted October 31, 2007 I am currently having problems with this date format as well. Being a novice with Filemaker, I'm not too familiar with scripts. However, I have done the following: Check that the system is using dd/mm/yy format Check File Options to make sure it's using the system format Check the date field in Layout format to make sure it displays as dd/mm/yy I'm not sure what else I can do. Any ideas?
comment Posted October 31, 2007 Posted October 31, 2007 A description of the actual problem would be helpful.
Vecordious Posted November 1, 2007 Posted November 1, 2007 (edited) Ah, sorry about that. Still a newbie I have a database that is served on Filemaker Server 8 Advanced. I used the 'Site Assistant' converter to create the XSL search page for use to search the database. The database is a timetable for a school. When the search results are returned, the date is in mm/dd/yy format. I'm in Australia, so I need the format to be in the dd/mm/yy format. (Does this explain my problem a little better?) Cheers. =================================== Edit: I've managed to fix it by defining the 'date' field as 'text' instead of date. Go figure! Although... is that going to cause complications later on? Edited November 1, 2007 by Guest
comment Posted November 1, 2007 Posted November 1, 2007 Quote is that going to cause complications later on? Major ones. Not a good idea at all. I suspect the problem is caused by whatever converts your FM data into HTML (XSL? PHP?). You could run a test by creating a brand new file with a single date field, enter a few dates, and serve it. A new file is sure to inherit the date format of the system it's created on, so if the same problem occurs, the fault is not within the file or even Filemaker.
Vecordious Posted November 1, 2007 Posted November 1, 2007 Thanks for the advice. I shall try it out and let you know how I go.
Recommended Posts
This topic is 6341 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now