Jump to content

problems: date formatting and auto-entry of dates


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

Recommended Posts

I have been using a FM6 DB as a lab notebook for the past 3 years. I recently upgraded to FM7 and migrated my old files over to FM7. My layout has a date field that is set to auto-enter the current date upon creation of a new record. When I created the FM6 DB, I had my Control Panel:International:Date settings set to DD.MM.YYYY and the field format was set to be the same, but now I have both these settings set to standard US usage. So now in FM, I have the date field set to be formatted MM/DD/YYYY and I have the Use System Formats checked. My problem is that when FM7 does the auto-entry, it enters the date as DD.MM.YYYY and causes a validation error in that field (I see a '?' in the field). If I then manually change the date to MM/DD/YYYY, FM7 accepts it. This behavior occurs whether or not I have the Use System Formats checked. However, the date shows up DD/MM/YYYY if I uncheck Use System Formats (it toggles between DD/MM/YYYY and MM/DD/YYYY when I check and uncheck it, but never shows up using a period as the separator). How do I make FM7 enter the date in the field in the correct format? I have read in the help that some of the formatting settings from when the file was created are somehow embedded in the file. . .how can I strip them out or make my files 'relearn' their formatting and international settings?

Link to comment
Share on other sites

Um, if you cannot find a solution to that problem and all else failed, try to work around with this:

Instead of auto-enter with date, make it auto-enter with calculation and put in this: = get(todaydate).

If it still doensn't auto-format or still displays the question mark, try to put this in the calculation: = month(get(todaydate)) & "/" & day(get(todaydate)) & "/" & year(get(todaydate))

It's a rather stupid work around but it works I think. I bet someone else might have a better solution.

Link to comment
Share on other sites

That function doesn't exist in any version. Get( CurrentDate ) is what you want. It's equivalent to Status( CurrentDate ) in previous versions. 'Today' is the function that's no longer available.

Link to comment
Share on other sites

thanks for the help and workarounds. but, is there a way to "reset" the international settings of my datbase? i am referring to the fact that i read in the help that FM DBs retain the international formatting settings from when they were created. can i make my DBs to have US formatting?

Link to comment
Share on other sites

Did you try this: file -> file option -> text -> data entry -> use system settings?

For the caculation above to work, put only this in the caculated value:

Month(Get(CurrentDate)) & "/" & Day(Get(CurrentDate)) & "/" & Year(Get(CurrentDate))

Also, if you use this approach, please set the field type to text.

Link to comment
Share on other sites

yes, i have the "always use system settings" box checked.

i have my records sorted by date (the date that is in the problematic field). if i set the field type to text, will my sorting still work correctly?

Link to comment
Share on other sites

doesn't a clone of a file have the formatting but not the data? i'd like to keep my data. . .

or should i clone the file and then import the data from the old db into the new cloned db?

Link to comment
Share on other sites

This topic is 7095 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.