Question: I'm trying to write an expression for the value parameter in Microsoft's SSRS but struggling. Basically we have a report that starts at 0800 and runs for 24hrs before it resets again the next 0800hrs the report is extracted at several times over the 24hr period.

I think I understand the logic however I'm not verse enough to transfer that to code. Something like:

```
If today's time => 0800 Then
Extract values from today's time 0800 onwards
Else If today's time < 0800 Then
Extract values from today + yesterday after 0800

```

Answer: 
I think you would want something similar to below, but without more information regarding report values, you will have to piece that part in:

```
=Iif((FormatDateTime(Now(),HH:mm)) >= "0800", 
TodaysTimeOnwards.Value, 
Iif((FormatDateTime(Now(),HH:mm)) < "0800", YesterdayTime.Value, Nothing)

```
I believe this does what you're describing

Start: `=Now().AddHours(-8).Date.AddHours(8)`

End: `=Now().AddHours(-8).Date.AddHours(8).AddDays(1).AddSeconds(-1)`