Jump to content
Server Maintenance This Week. ×

International vs USA date formats


lpm

This topic is 6021 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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" ]

)

Link to comment
Share on other sites

  • 1 month later...

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?

Link to comment
Share on other sites

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 by Guest
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 6021 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.