Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date format is in mm/dd/yy but I need dd/mm/yy! 1

Status
Not open for further replies.

Only1Abhi

Technical User
Jan 26, 2003
77
GB
Basically, when I choose the Data Type for my field "Date" as Date/Time, all dates are in:

month/day/year format.

I need day/month/year format!

How is this possible?

Many thanks!
 
Hi

Have you set the 'locale' in windows, to set the local characteristics of your PC, eg language, time zone, currecy seperator, date style etc - Access should default to use the style of date (eg mm/dd/yy or dd/mm/yy) from there, but you can explicitly set it in the format property or using the format statement

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
yeh thanks!

It did work actually!

The regional settings on CONTROL PANEL had language set to English (US) and not English (UK)

That solved the problem.


Many thanks!

Best Regards,
Abhi
 
lol... then again people...

I was thinking...

Is it possible for the "Dates" field (updated name of the field "Date") to have TODAY's date automatically stored everytime?


When I make a transaction, it will be automated to TODAY's date.
But when I make a transaction tommorow, I want TOMMOROW's date automated. And I want this value to be stored on the table and not just viewed on the form please.


Is this possible?

Many thanks!
 
Hi

Date() is a builtin function in Access, it returns todays date.

Avoid using reserved words (such as Date) as column names etc, you can best do this by sticking to a naming convention (eg frmMyForm, datDate etc for objects within your database), but to answer your question, yes you can do that, just put =Date() in the default property of teh column in the table, or in the defualt property of the control on the form.

Note as well as Date(), you can also use Now(), this returns the current date AND Time (eg dd/mm/yy hh:mm:ss)

I re-emphasis advice reference the use of reserved words, common examples I come across are Date, Time, Name, Value use of such names will end in tears


Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
thanks Ken
someone else in another forum suggested the same.
It worked.
Many thanks.
Bye!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top