Use datatime data type and pass just date part from CR or strip off the time part wherever you are planning to use it.
declare @.d datetime
set @.d = getdate()
select dateadd(day, datediff(day, 0, @.d), 0)
go
AMB
|||Thanks! but how do you pass just the date part from CR? Any idea would be greatly appreciated!! I can strip off the time part inside the stored procedure in SQL 2005 but CR is using the parameter which is datetime....
|||Sorry about that, but I think that question could be answered better in a CR newsgroup. Try:
datetime(datepart("yyyy", {@.d}), datepart("m", {@.d}), datepart("d", {@.d}), 00, 00, 00)
AMB
|||Thanks AMB....that will work but that code is for the inside on the report...my problem lies in the parameter prompt window..how can I let the user only select the date without seeing the the time on the parameter prompt window?....|||Sorry I have no idea. As I mentioned in my previos post, these questions would be better asked in a CR newsgroup.
AMB
No comments:
Post a Comment