Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases 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 April 24th, 2004, 01:06 PM
Authorized User
Join Date: Mar 2004
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default Date formats... dd/mm/yyyy

I have a MDB database ( no surprise there )
the date is stored as a text field ( yes deliberately )

The date is extracted using
SELECT Format$(CDate(Left([FileDateTime],10)),'dd-mm-yyyy') AS gdate FROM Header GROUP BY Format$(CDate(Left([FileDateTime],10)),'dd-mm-yyyy') ORDER BY CDATE(Format$(CDate(Left([FileDateTime],10)),'dd-mm-yyyy')) DESC;
Which works fine in access and returns as 01-04-2004 for 1st April 2004
however when using the same SQL statement through ASP it formats it as 04-01-2004 so 4th January.
Regional settings are set to UK, and everything else is fine...

Any clues or tips anyone..
have tried breaking it down with DatePart also, but it seems to be when it executes the SQL over the Jet.OLEDB connection

Reply With Quote
  #2 (permalink)  
Old April 24th, 2004, 02:12 PM
Authorized User
Join Date: Mar 2004
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts

resolved it by having converted all the string dates to yyyy/mm/dd dates, although still don't understand why it converts it to US format when all the regional settings everywhere are UK

Reply With Quote
  #3 (permalink)  
Old June 14th, 2004, 12:24 PM
Registered User
Join Date: Jun 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts


sorry about the pageslap as an answer, but I still haven't found the answer to the question I'm looking for that lead me to your thread . . .
Reply With Quote
  #4 (permalink)  
Old June 14th, 2004, 12:34 PM
Friend of Wrox
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post

Hi SeanW,

This has been discussed in another thread. You can take a look at this


-Vijay G
Strive for Perfection
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
How to pull Month & Year from Date(dd/mm/yyyy) istcomnet Classic ASP Basics 2 April 22nd, 2008 06:22 PM
Date dd-mm-yyyy John2112 SQL Server 2000 2 March 16th, 2007 05:15 AM
Converting short date to show mm/dd/yyyy crabjoe Access 4 March 7th, 2007 03:46 AM
convert "MM/dd/yyyy" to "dd/MM/yyyy" xin56 General .NET 4 March 28th, 2005 05:33 AM

All times are GMT -4. The time now is 04:59 PM.

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