|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
How can I select where date = currentdate()?
I am developing a DTS package and one of the things I need to do is grab everything in a table that has a date column based on the current date.
I've got the following: Code:
SELECT Class1.*, ListDate FROM Class1 WHERE (ListDate = GETDATE()) Now this is fine but my date is formatted mm/dd/yyyy and the SQL date is of course formatted in it's own long way. How can i make my where statement only use the DATE and not the time from the SQL? Thanks! |
|
#2
|
||||
|
||||
|
Try this
Code:
WHERE ListDate = CONVERT(char(10),GetDate(),101) |
|
#3
|
||||
|
||||
|
Sweet! Works like a charm!
|
|
#4
|
||||
|
||||
|
Review my signature above about "Helpful Posts" and showing appreciation by adding to someones reputation.
|
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > How can I select where date = currentdate()? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|