Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 date help

Author  Topic 

Onamuji
Aged Yak Warrior

504 Posts

Posted - 2001-07-18 : 13:40:27
Ok, so dates are easy but I need to cut the time off...

there is a table

Files
-FileId
-Name
-Location
-StartDate
-EndDate

the start and end dates are what i'm having issues with... i need to just have them be dates but when they are inserted times get attached with them for some reason i have a stored procedure that retrieve all active documents which have a start date greater than or equal to today and an end date less than or equal to end date... i'm sure there is just a date function i've overlooked...

select FileId, Name, Location from Files where StartDate >= getDate() and EndDate <= getDate()

that doesn't work because of the time attribute on the column :-( any help, anyone?

Thanks :-D

Regards,
Adam
   

- Advertisement -