Jump to content
Sign in to follow this  
lpm

International vs USA date formats

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

Share this post


Link to post
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" ]

)

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

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