hi friends,
i have two datetime parameters in my report ... based on these parameters , am searching records ... the issue is i cant get the full datetime value
for example
i am searching records based on 03/16/2007 and 03/20/2007... i can't the records for the date 03/20/2007...
bcoz, the value of the date is '03/20/2007 00:00:00.000'
i want to get the value like this ' 03/20/2007 11:59:59 pm''
can any one help me
You can specify the time part for the parameter and retrieve the records. I mean, you can type 3/20/2007 11:59:59 PM in the parameter field.
Shyam
|||but the issue is i just want to give my date only... like this 3/20/2007
... it has to take the time by default 11:59:59 PM ....
|||You have to specify the expression for your date parameter in dataset. For example, if your parameter name is @.to_date in your stored procedure, the report parameter name would be to_date.
Go to Data tab and select the appropriate dataset from the dropdown and then click the Edit (...) button besides it. Go to Parameters tab and for the @.to_date parameter, give the expression for Value as:
=DateAdd(DateInterval.Second, -1, DateAdd(DateInterval.Day, 1, Parameters!to_date.Value))
This will add 1 day to your given date and then subtract 1 second from that date and this value will be passed on to the stored procdure or SQL query (whichever you have used)
Shyam
|||i am pleased to thank you shyam...thanx for your help .. i have implemented ...|||I know this solution is definitely working. But just wanted to be perfect on this. :-) The "correct" way to do something like this is to offset 3 milliseconds instead of 1 second. HTH.
No comments:
Post a Comment