Results 1 to 6 of 6

Thread: SQL Date & Time Problem

Threaded View

  1. #1
    Join Date
    Jun 2004
    Posts
    4

    SQL Date & Time Problem

    I'm having a... understandable SQL date problem... I don't believe there is anyway to correct this but I'll stil ask

    I have NO problem WHATSO EVER with searching with dates as the criteria. however when I have a date and time field it gives me a error.

    e.g.

    I use the following ASP script
    (Lets say I have already connected to the database through "Connd" )

    The following script works fine

    Code:
    
    datesrch = 11/10/2003
    
    set dateRS = Connd.Execute("Select * from Users where datejoined > " & datesrch)


    But this script has a problem.

    Please note that I do not declare the datesrch variable myself in the real code I retrieve it from the database in DATE format.

    Code:
    
    datesrch = 11/10/2003 12:00:00PM 'or something similar I know it definately IS a valid date
    
    set dateRS = Connd.Execute("Select * from Users where datejoined > " & datesrch)
    also does it matter that I'm using a MSAccess database but the database server engine is MySQL?

    Please also Note that I have THOUSANDS OF SQL, ADO and ASP lines of code that work perfectly on my site.

    Thanks for your time I will REALLY apreciate if you can help me in this query.
    Last edited by JamesRiley; 06-12-2004 at 11:08 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •