Wrox Programmer Forums
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
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

 
Old April 24th, 2004, 02:12 PM
Authorized User
 
Join Date: Mar 2004
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

 
Old June 14th, 2004, 12:24 PM
Registered User
 
Join Date: Jun 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

http://www.flws.com.au/showusyourcod...te.asp?catID=3

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 . . .
 
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
Default

Hi SeanW,

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

Cheers!

_________________________
-Vijay G
Strive for Perfection




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





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