468,315 Members | 1,447 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,315 developers. It's quick & easy.

Date formatting dd/mm/yyyy

Hi there,

I've read stacks of articles on this subject in this newsgroup, so
forgive me that this is just another one. I've tried almost all the
suggestions offered, and am still having no luck. I'd really
appreciate any help/advice that can be offered.

I'm trying to obtain and then store all sorts of data, some of which
are dates. In all cases, I would like dates to be in European format
(ie. dd/mm/yyyy). My computer's regional settings are dd/mm/yyyy.

To do this, I have ensured that all the text boxes on my form are in
the format dd/mm/yyyy. All fields in the tables that I am saving to
have the data type 'Date/Time' and their format is specifically
dd/mm/yyyy.

However, when I use the following SQL to save the value in my text box
to the table, the date is automatically converted to mm/dd/yyyy.

"Update TblDetail Set ReviewDate = #" & txtReviewDate.value & "# where
ID = 1"
-- where txtReviewDate.value = 01/05/2003.

If anyone can suggest a simple way of ensuring that exactly what is in
the text box is saved to the table to be exactly the same, that would
be MUCH appreciated! I am trying to avoid actually storing the dates
as text, as any subsequent queries to sort by date would involve
changing all my code to use CDate().

Thanks, Angela
Nov 12 '05 #1
2 11728
Ange, I've been using Access in a country with dd/mm/yyyy dates since
version 1. My experience is that there are three cases where Access gets our
dates wrong. Details:
http://users.bigpond.net.au/abrowne1/ser-36.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html

"Ange T" <sm*************@yahoo.com> wrote in message
news:b7**************************@posting.google.c om...
Hi there,

I've read stacks of articles on this subject in this newsgroup, so
forgive me that this is just another one. I've tried almost all the
suggestions offered, and am still having no luck. I'd really
appreciate any help/advice that can be offered.

I'm trying to obtain and then store all sorts of data, some of which
are dates. In all cases, I would like dates to be in European format
(ie. dd/mm/yyyy). My computer's regional settings are dd/mm/yyyy.

To do this, I have ensured that all the text boxes on my form are in
the format dd/mm/yyyy. All fields in the tables that I am saving to
have the data type 'Date/Time' and their format is specifically
dd/mm/yyyy.

However, when I use the following SQL to save the value in my text box
to the table, the date is automatically converted to mm/dd/yyyy.

"Update TblDetail Set ReviewDate = #" & txtReviewDate.value & "# where
ID = 1"
-- where txtReviewDate.value = 01/05/2003.

If anyone can suggest a simple way of ensuring that exactly what is in
the text box is saved to the table to be exactly the same, that would
be MUCH appreciated! I am trying to avoid actually storing the dates
as text, as any subsequent queries to sort by date would involve
changing all my code to use CDate().

Thanks, Angela

Nov 12 '05 #2
Allen and Steve,

Thank you both so much!! Steve, inserting your simple combination of
format() and ## did the trick perfectly. I should have posted the
question about a week ago when I first started picking up this
problem...

Allen, your URL was really useful in explaining what on earth the
problem was.

Thanks again, vm appreciated! Angela
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Gerrit Holl | last post: by
4 posts views Thread by dhnriverside | last post: by
12 posts views Thread by Rob T | last post: by
11 posts views Thread by Lauren Quantrell | last post: by
2 posts views Thread by johndcal | last post: by
21 posts views Thread by Darin | last post: by
9 posts views Thread by TC | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.