in my table am storing one column(smalldatetime).
i need to retreive records by giving just date- and search the column specified above.
Ex:
10/6/2010 4:01:00 PM - this is the actual value in Column.
And i just want to search records from table by givin today's date. ..???
ALTER PROCEDURE [dbo].[spDisplayAllOpenPrepaidSales]
@preStatus int,
@preCompanyId int,
@preCounterId int,
@preBillerId int,
@today smalldatetime
AS
BEGIN
print @today
select * from PrepaidSaleHeader
where preOpenStatus = @preStatus And preCompanyId = @preCompanyId And
preCounterId = @preCounterId And preEntryUserId = @preBillerId And preDate > @today
order by preDate
END
And pass parameter like;
spDisplayAllOpenPrepaidSales 0,2,4,2,'10/06/2010 00:00:00 AM'
Now this retreives record but gives me back - date in 24-hour Format.