Does the file have any history that includes another date format (e.g. did you create it by adapting an existing file)?
Go to Object [Object Name: "SearchDate"] - (I've named the date field like that because I have 2 around the layout)
Insert Calculated Result [Select;(Get ( CurrentDate ) - 5 ) & "..." & (Get ( CurrentDate ))]
Why don't you simply use Set Field  ?
I have 1 date field in the header and 1 date field in the subsummary part and I want the search to be in the header only, that's why I named the one in the header "SearchDate".
I've tried to use also the Set Field but the result is the same.
The problem is that, for example, if I make a simple script with "perform find" and I make as search criteria "//" it works just fine and I get the today date list (dd/mm/yyyy).
But on "get (currentdate) it comes with the US date format (mm/dd/yyyy).
I've checked the date format in that field in different ways but nothing...
**I forgot to mention, I use Filemaker 11 on windows 7
Thanks for reply, I'm newbie and I've been a user of FM for 7 years but I got on programming just 6 months ago, learning on books and videos of John Mark Osborne, :smileyhappy:
I have 1 date field in the header and 1 date field in the subsummary part and I want the search to be in the header only,
The search takes place in the table, not on the layout. If you have two instances of the same field on a layout, it doesn't matter which one is used to enter the criteria. Set Field works directly on the data level, and doesn't require the field to be on the layout at all.
You haven't answered my question re the file's history.
ok, thanks for the "opening eyes" about the search.
The file is totally mine from the very beginning, doesn't have any old file piece or script coming from other files.
Actually when I started to make this search script I had only one date field and I was working on that field only.
Then I've created the second one as a test (mostly) to see if by changing the format of this second field by US format was going to work.
Formatting a field instance on a layout has no bearing here. I would suggest you try the following:
1. Make sure your OS short-date format is set to DD/MM/YYYY.
2. Save a copy of your file as clone (no records).
3. Close your file, open the clone and import records from the original file.
well...I can't thank you enough,
I just remade the script using Set Field instead of "Go to object and insert calculated result", I took off the second extra date field from the layout and it worked like a charm! :smileyvery-happy:
yet I still don't get why with the "insert calculated result" it comes up with the US date format.... mysteries of pc I guess.. hehe
Checking the short date format in my OS was one of the first thing I did, but it was already ok (dd/mm/yyyy).
but I'll try to make a test with a clone of the file without any record, just to make sure.
it seems like is changing format only when I "insert calculated result" using "get (CurrentDate)" , (no problems with // or set field).