Brad
01-14-2003, 03:17 PM
Hi,
I have an SQL Table which holds a time stamp field, in the format here:
13-01-2003 11:06:45
I need to only search on the Date bit, not the time bit, but when I try the following sql string in my ASP page, I get the following:
SQLStr = "SELECT INFOEDIT.EDITDATE, INFOEDIT.REFNO, INFOEDIT.NEWUSERMN, INFOEDIT.STATUS, INFOEDIT.TEXT, INFOEDIT.USERMN FROM INFOEDIT WHERE INFOEDIT.USERMN = '" & logmne & "' AND INFOEDIT.TEXT Like '" & criteria & "%' AND INFOEDIT.EDITDATE Like " & cdate(logdate) & " ORDER BY INFOEDIT.REFNO DESC;"
The reason I employed the CDate function, was to try and get rid of the time bits, but it didn't help.
Can anyone advise how to ignore the time part of the time stamp field, please ?
I know the code works, apart from the date criteria, as I've removed it and run it fine.
Thanks in advance,
Brad.
PS - One day, When I know whatr I'm doing, I'll return the favour.
I have an SQL Table which holds a time stamp field, in the format here:
13-01-2003 11:06:45
I need to only search on the Date bit, not the time bit, but when I try the following sql string in my ASP page, I get the following:
SQLStr = "SELECT INFOEDIT.EDITDATE, INFOEDIT.REFNO, INFOEDIT.NEWUSERMN, INFOEDIT.STATUS, INFOEDIT.TEXT, INFOEDIT.USERMN FROM INFOEDIT WHERE INFOEDIT.USERMN = '" & logmne & "' AND INFOEDIT.TEXT Like '" & criteria & "%' AND INFOEDIT.EDITDATE Like " & cdate(logdate) & " ORDER BY INFOEDIT.REFNO DESC;"
The reason I employed the CDate function, was to try and get rid of the time bits, but it didn't help.
Can anyone advise how to ignore the time part of the time stamp field, please ?
I know the code works, apart from the date criteria, as I've removed it and run it fine.
Thanks in advance,
Brad.
PS - One day, When I know whatr I'm doing, I'll return the favour.