Date format in MS ACCESS

Hey folks,

I’m working on a dynamic website using asp and ms access . in the database I created I have a field in one of the tables with the data type date/time and the. I want the date in the format dd/mm/yyyy and I set the format in ms access just like this but it doesn’t seems to be working. It’s in the formt mm/dd/yy. can anybody tell me how I should go about it?
Thanks.
kerorozaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

peter57rCommented:
Wouldn't you want the date presented in the User's local format?

You can use:

FormatDateTime(Date(),vbLongDate)   ' or shortdate

(also, I assume you mean you are accessing the 'Access' database via asp, not writing  asp from within Access)


Pete
0
kerorozaAuthor Commented:
Yeah that's right i am accessing the Access database via asp. But the date format should be the dd/mm/yy
0
kerorozaAuthor Commented:
Yeah that's right i am accessing the Access database via asp. But the date format should be the dd/mm/yy
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

peter57rCommented:
Well there is general date format function here:
http://www.peterweighill.co.uk/asp.html

Pete
0
nmcdermaidCommented:
Any formatting you do in Access isn't going to be automatically reflected in your web page.
0
kerorozaAuthor Commented:
But I’m reading the date from an access table
0
peter57rCommented:
Access formatting is for Access users.

You are NOT using Access.  You are using the data tables part of an Access application.
The tables are managed by a completely separate program called JET.  That is why you use the JETOLEDB provider not an Access OLEDB provider.  

The 'Access' part of MS-Access is the bit that enables you to create a user interface and process the data in the tables.
You are using a different UI tool so all you have is what is contained in the JET table definition which is much less than Access allows you to specifiy.

You have to assume that you just have raw data values in the table.  Everything else is down to you with your front-end design.

Pete



0
kerorozaAuthor Commented:
so you are telling me i should specify the format in my vbscript code, and if that's so is ther a function for that?
0
kerorozaAuthor Commented:
so you are telling me i should specify the format in my vbscript code, and if that's so is there a function for that?
0
nmcdermaidCommented:
I think the functions you need have already been mentioned above.
0
peter57rCommented:
As i said before:
Well there is general date format function here:
http://www.peterweighill.co.uk/asp.html

Pete

0
thorkylCommented:
With asp accessing the database there are two ways to deal with it.

First and simplest is to go to the operating system and change the way it displays the date.
To do this:
   Control Pannel => Regional Settings => Date

NOTE: This will effect all settings on the server including file save dates on the shares.

Second is to change your ASP code.
Format(vMyDate,"dd/mm/yyyy")

Thorkyl
0
peter57rCommented:
?Format()
In Vbscript?

Pete

0
kerorozaAuthor Commented:
Vbscript doesn't know the function format()
0
kerorozaAuthor Commented:
Is there a way to format the date read from the access table to an european date format that is dd/mm/yy i'm looking for a built in funtion like foratdatetime()
0
peter57rCommented:
'i'm looking for a built in funtion'

There isn't one.

Pete
0
thorkylCommented:
if your looking for a built in function then you will need change the OS settings on the server.

Access does not control the way dates are displayed in any application except Access only the way they are stored.
0
positronicCommented:
This might be useful... it worked on our server...

http://www.webwizguide.info/asp/faq/date_time_settings.asp

If you add:

<%
Session.LCID = 2057
%>

in your ASP, it should cause dates to be displayed in UK format (i.e. dd/mm/yyyy) plus the web link has a list of all the different LCID codes for different locations.

--Simon
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kerorozaAuthor Commented:
Thanks positronic, it worked. U r a life saver!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.