It might be wise if you're on two continents to start using Get(CurrentTimeUTCMilliseconds) as a more accurate comparison. Then you can translate that value into the display and functions you need. UTC time is not affected by format or timezones, so it's more sacrosanct than date/time stored by a user's setting.
thanks, does the data entered in the browse mode date fields change format to US also?
I wouldn't say it's more accurate...That function uses the client's clock, not the host clock. I don't know how it figures the timezone. That's an interesting question.
If "absolute" time is required, use Get ( CurrentHostTimestamp ). If "local" time is required, I recommend a custom function that takes host timestamp and modifies it based on the timezone (which you can calculate using UTC and regular Get ( CurrentTime).
I agree a lot with David.
Get(CurrentHostTimeStamp) is a must in every solution that requires control over amendment to historical data.
Every bozo can modify his own computer's clock (and date setting), allowing him to alter old data as problems arise with the decisions made in the past. Using exclusively the server's clock setting is a wise decision.
In our medical solutions we only allow changes to data "born" today. Implementing the law, nothing more.
There are some excellent recommendations here and I would like to add one that does not answer the question but will help you discover an answer for yourself.
Set up a layout for user testing that will be just that and different users in different locations can tell you what happens there. You will have many devices hitting your databases and may find that PC brands make a difference plus how the user sets up his computer as siplus mentioned about user's changing their clocks (daylight standard time for instance).
You could set up a calculation to enter one time into the various fields and ask how the users see it. Note that one good idea is to create a calculation field that would display it in text such as Thursday, December 10, 2015 and FileMaker offers a format for the date field that does that.
Keep in mind that there are many different 'calendars' that start from different time periods, etc. but we won't worry about in this post.
Consider just three types of dates: Military, US and European. Not an exact naming of course.
Verbal: Thursday, December 10, 2015
It would be a valuable idea to add a duplicate of the field set for not enterable and have it show the text date alerting people f a different date format that might have been used. And showing the four formats as I have done can be helpful.
Since you can hide/show fields in 13 and 14 you can let the user select the format for date entry and stack the fields on top of each other showing A if $$FieldType = US or B if $$FieldType = Euro and so on. This default can be set on startup.
Now you don't have to worry about this as the user will make their selection and FileMaker will handle the date internally for you.
Of course the best solution is to use popups for the date and month and year and only offer 1-12 for month, 1-31 for day, etc.
Keep in mind that a laptop with one of the 9 types of FIleMaker installations based on language can be used anywhere in the world... Yikes...
Thus my suggestion is to not try to control this yourself but to let the users decide for themselves and for you to accomodate their preference. Someone will open a Japanese version of FIleMaker on a Windows OS running a European version of the OS in the United States...
thanks to all for this, having studied it I have found that what will solve my specific query is:
I have 2 dates and I need them in the same format so I can compare if one is the same as the other.
1 - is simply Get (CurrentDate)
2 - is a UK date stored in my database configuration.
so is there a way
if I can use a calculation to take
Get (CurrentDate) and convert it into UK format?
cant figure it out, I am thinking of using dayofyear() to compare the days simply as that should work no matter the date format
getasnumber(date1) = getasnumber( date2) should fit your bill.
yes it does! great solution..