Question Date format from Regional Settings

genesis

Registered User.
Local time
Yesterday, 16:33
Joined
Jun 11, 2009
Messages
205
Hi, I have a question. my default format of date is base on the regional settings that is for example the regional setting for shortdate format is m/d/yyyy, then date would appear as for example 6/5/2009 but what I need was the format should be mm/dd/yy such as 06/05/09.

yes we can set the format of date in the textbox as 99/99/00; so that it is like mm/dd/yy but it makes an error and if saved in the table, it still bear the format in the regional setting.

yes I can manually tune the shortdate format of a date into mm/dd/yy but what I would like to do is to set the regional setting shortdate format by code because the user will have the setup procedure in the access project.

Can somebody show me how to alter the shortdate format of the regional setting by vb code! Highly appreciated.

I would like to say, that I have used my friend google but my friend did not gave me anything close to what I need.
 
I'd say just use the textbox format and don't worry about how it's actually stored in the database. It's actually a double number with a particular interpretation so it really hardly matter whether it's m/d/yyyy or mm/dd/yy as the resulting value actually stored in the database will be identical.

It's usually not nice to play with user's computer as regional setting is global to the whole OS. You don't want to break 9 applications to make your application "work".
 
ok. but what about the error that appears after I input the date?
 
it says something about incorrect format. i dont remember the whole paragraph.
 
Unfortunately, that's not much to go by. There could be several different reasons for this.

Try and elaborate more.

1) Just to be sure, what is the backend used here?
2) How is the form setup?
3) Is the field in question bound to a date field or merely a field that looks like a date?
4) Do you know precisely when the error occurs and whether it's a result of code behind the form or by access itself?
 
ofcourse I have checked everything. actually I did not created the backend yet to eliminate possible error in the backend. the field is bound on the date field in the table I have not actually setup the mask type in the table so that it will acquire the format of the field in the form.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom