Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | 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
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 3rd, 2005, 02:20 PM
Authorized User
 
Join Date: Jun 2003
Location: , , .
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Default retrieve from Access by Date

ok This is the query i use to get data between startDate and endDate including if the dates entered are both today, it should return the record from only today.
However it does not the record set is eof. I have tried with "BETWEEN #" & CDate(startDate) & "# AND #" & CDate(endDate) & "# " with the same result an empty record set. However Data is in there.... Now if e.g i specify between two years it works like a charm... what is wrong???


objCommand.CommandText = "SELECT * From DataHead WHERE " & strList & " > 0 AND Finish = true AND DateCompleted >= #" & CDate(startDate) & "# AND DateCompleted <= #" & CDate(endDate) & "# Order BY CaseOfficer "

... there is always more to learn...
__________________
... there is always more to learn...
Reply With Quote
  #2 (permalink)  
Old May 3rd, 2005, 03:15 PM
Authorized User
 
Join Date: Jun 2003
Location: , , .
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Default

ok ... it kills me ... if i change the startDate let's say from 05/03/2004 and the endDate to 03/05/2006 it works great ... but even between 01/01/2005 and 12/31/2005 it does not pick the entry upi took the Cdate(startDate) out and put it before the SQL statement startDate = CDate(request.QueryString("start")) (same with endDate) an it still sucks ... sooooo frustrated

... there is always more to learn...
Reply With Quote
  #3 (permalink)  
Old May 4th, 2005, 12:53 AM
Friend of Wrox
 
Join Date: Apr 2005
Location: Cochin, , India.
Posts: 186
Thanks: 0
Thanked 0 Times in 0 Posts
Default


May be you have a wrong system date format , not the loggedin user but aspnet process (I_user...). Also try using the month abrv(jan,feb,...) instead of numeric.
You could print the CommandText and test directly in a access query window(if you have done, Is the result comming ok)

Prashant


Reply With Quote
Reply


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
retrieve date with format (M Y) form database php Mahmoud82 PHP How-To 2 November 30th, 2006 07:10 AM
How to retrieve sistem date?? MAKO C# 1 April 12th, 2006 12:59 PM
Retrieve Date/Time From Network Server wscheiman Access VBA 3 February 21st, 2006 08:56 AM
how to retrieve the current date from the calendar johnsonlim026 ASP.NET 1.0 and 1.1 Basics 1 July 8th, 2005 01:19 PM



All times are GMT -4. The time now is 12:33 AM.


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