View Full Version : Date() and Desktop Settings


alcifer_c
12-09-2003, 02:28 PM
Good day,
I have an access application with a few command buttons, used by staff to log calls. The default value for the date field is "Date()" For the past 6 months, the app has worked flawlessly.

Recently, their machines were upgraded to windows 2000 and in the process, the date format for windows was changed from the yyyy/mm/dd to yyyy/dd/mm. So now when clicking the command button to log the call, the date is incorrect in the table.

In order to make the application more robust, I would like access to handle this situation by accepting any date value from windows and converting(?) or saving it in the table in the format I want to use for reports, queries etc.

I have attempted to use format in the default value, however it doesn't change it the right way, I start getting weird values like 2009-03-12 etc...instead of 2003-09-12.

I just love working with dates...your help appreciated.

Pat Hartman
12-11-2003, 11:01 AM
Dates should ALWAYS be stored in a field with a date/time data type. How they are displayed is a formatting issue and is easily handled by setting the format property of a control if you don't want the date displayed using the default windows format. If your dates are stored as text strings you are making considerable work for yourself. Change your table definitions and correct any invalid dates.