Rock
Rock

Reputation: 159

give fromdate with Todays Date and time should be 00.00.00 in ssrs reports

enter image description hereI 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

Answers (2)

Daniel Simith
Daniel Simith

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")

enter image description here

Upvotes: 0

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

Related Questions