Reputation: 159
I want to pass datetime parameter in such format that it should display today date with time 00.00.00 and todate like today date with time 23.00.00 in ssrs reports.
Upvotes: 0
Views: 2196
Reputation: 31
You can use Format() function to achieve your goal.
=Format(Now(),"dd-MM-yyyy 00:00:00")
=Format(Now(),"dd-MM-yyyy 23:00:00")
Upvotes: 0
Reputation: 9053
Misunderstood before, you have to use AddHours
, AddMinutes
and AddSeconds
in parameter's default expression:
=Today().AddHours(23).AddMinutes(59).AddSeconds(0)
UPDATE
You can hide time in following:
=CDate(Format(Today().AddHours(23).AddMinutes(59).AddSeconds(0), "MM/dd/yyyy"))
Upvotes: 1