June 25, 200421 yr 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?
June 25, 200421 yr When there's a question mark, that means the field is not big enough Just increase the field's width a little, and you will see full-formatted date.
June 25, 200421 yr Author thanks for the quick response, H.P. but, i have tried that and it doesn't help.
June 25, 200421 yr 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.
June 25, 200421 yr Author does get(todaydate) work with FM7? I thought I saw that this function is no longer implemented in FM7.
June 25, 200421 yr 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.
June 29, 200421 yr Author 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?
June 29, 200421 yr Author i tried using Date=Month(Get(CurrentDate)) & "/" & Day(Get(CurrentDate)) & "/" & Year(Get(CurrentDate)) this resulted in an empty field.
June 29, 200421 yr 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.
June 29, 200421 yr Author 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?
June 29, 200421 yr Have you tried making a clone of your file with the options set for US dates? The clone should have the correct format.
June 29, 200421 yr Author oh, i forgot. . .i only had Month(Get(CurrentDate)) & "/" & Day(Get(CurrentDate)) & "/" & Year(Get(CurrentDate)) in the calculated value field as you suggested.
June 29, 200421 yr Author 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?
June 29, 200421 yr Author saving a copy of the file and then tyring to work with the copy doesn't solve the problem (dates are still auto-entered as dd.mm.yyyy)
June 29, 200421 yr It has to be a clone not a copy. After the clone is made, you will have to import the data from the oridginal file.
June 29, 200421 yr Author well, that's sort of a pain, but it worked. thanks for all the help. seems to me there should be an easier way. . . cheers, tom
June 29, 200421 yr You only have to do it once. It is certainly less painful than most of the other suggestions.
Create an account or sign in to comment