|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
SQL - Please help
Hi all,<br><br>I ran this sql statement and it worked<br><br>SELECT *<br>FROM MEMBERS<br>WHERE (UserID LIKE '2%')<br><br><br>but when I tried to do the same for a date field, it didn't<br><br>SELECT *<br>FROM MEMBERS<br>WHERE (DateEntered LIKE '4/2%')<br><br><br>I got no errors but no records were returned either. <br><br>The date format is: 4/2/2002 2:06:00 PM<br><br>Please help<br><br><br>Thanks all,<br>JT
|
|
#2
|
|||
|
|||
|
you use # sign between date
|
|
#3
|
|||
|
|||
|
The # is for Access. If this is SQL you need to do it like this :<br><br>SELECT *<br>FROM MEMBERS<br>WHERE Month(DateEntered) = 4 <br> AND Day(DateEntered) = 2<p><hr size="1" width="50%" align="left" />dotNetBB Forum Developer<br><b><i>Building A Better Community, One Post At A Time</i></b><br><a href="http://www.dotnetbb.com" target="_blank">www.dotnetbb.com</a></p>
|
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > SQL - Please help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|