I am using Classic ASP and have the following VB script code
From8to14 = date-14
To8to14 = date-8
This sets the two variables.
For today, this would mean that
From8to14 = "13/07/2012"
To8to14 = "19/07/2012"
I then have a select query to SQL server, and I want to find any records where the DateMatched column is between (and including) these two dates
I have two conditions in the SQL when I declare it;
"AND INTRAY.DateMatched >= '"& Year(From8to14) &"-"& Month(From8to14) &"-"& Day(From8to14) &"' " & _
"AND INTRAY.DateMatched <= '"& Year(To8to14) &"-"& Month(To8to14) &"-"& Day(To8to14) &"' " & _
Now, this is not working properly because DateMatched column also includes a time in addition to the date, and I think the server is interepreting these dates as being at midnight at the start of that day ?
So, if a record has a DateMatched of "19/07/2012 17:41:22" then it is not being included.
How can I get around this?
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)