Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB Databases Basics
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
VB Databases Basics Beginning-level VB coding questions specific to using VB with databases. Issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Databases Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 23rd, 2005, 06:31 PM
Registered User
Join Date: Dec 2005
Location: Athens, , Greece.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Date problem in Access 2003

Hi, there.
I'm trying to execute a simple sql query in Access 2003 and one of my fields is of type date.

I want the date to be stored in format dd/mm/yyyy but Access automatically changes it to mm/dd/yyyy.

All my local settings are dd/mm/yyyy but Access still does the change.

Can U help me?

Reply With Quote
  #2 (permalink)  
Old December 27th, 2005, 08:32 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts

These are the Access instructions for this issue:
"Change the default country/region
Changing the default country/region changes the standard settings for numbers, currencies, time, and date to those most commonly used for that country/region.

On the Microsoft Windows Start menu, point to Settings, and then click Control Panel.

Double-click the Regional Options or Regional Settings icon.

In the Your locale (location) list, select the country/region you want to use as the default.

If you are using Microsoft Windows 2000 and don't see the item you want, first select the check box next to the appropriate language in the Language settings for the system box.

Click OK, and then restart your program.

Note When you change the country/region in the Your locale (location) list, settings, such as the format for displaying currency and date, may also change. Check all the tabs in the Regional Options dialog box to make sure they are correct."

If this doesn't work, you can do the SQL work around and have three columns for the date:

DD = DatePart("d", Date)
MM = DatePart("m", Date)
YY = DatePart("yyyy", Date)

Or sort out the dates in an array by breaking them down and then reassembling them for your code - which is a pain, or breaking them down and reassembling them for display only.


Reply With Quote
  #3 (permalink)  
Old December 28th, 2005, 07:38 PM
Registered User
Join Date: Dec 2005
Location: Athens, , Greece.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

Thank you my friend. I've tried the three column approach and it works fine. A little more work in the sorting SQL statements I use but the problem is solved.

Much appreciated!!!

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Date time picker in access 2003... aboredman Access 1 August 9th, 2007 08:58 PM
Access 2003 Problem allenle37 BOOK: Access 2003 VBA Programmer's Reference 2 May 7th, 2007 11:55 PM
Huge problem with access 2003 andy45 Access 10 May 24th, 2005 10:08 AM
Windows XP ( +access 2003) problem? belete Access 1 October 11th, 2004 09:19 AM
Access 2003 connection problem umzi ADO.NET 4 July 23rd, 2004 01:04 AM

All times are GMT -4. The time now is 05:48 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.