View Single Post
  #8 (permalink)  
Old August 24th, 2006, 03:16 PM
kkrish kkrish is offline
Registered User
 
Join Date: Jun 2006
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

Actually in the proc below

Declare @Str varchar(8000)
SET @Str = 'SELECT * from table_name
where CreationDate = "'+convert(varchar(20),@createdate,101)+'" AND
ID = Number'.
Exec(@Str)


the CreationDate is in the 'MM/DD/YYYY hh:mm:ss' format whereas the date value I am passing to @createdate is in 'MM/DD/YYYY' format


How do I remove/ignore the 'hh:mm:ss' part in the CreationDate?

Please help.

Thanks.

Reply With Quote