November 28, 2013 at 9:18 am
Hi all... I am trying to add a default date parameter in my report where the start date is yesterday @ 7AM. Can anyone help me with this?
I get the whole day piece, but how do I add a specific time?
November 28, 2013 at 9:36 am
Are you using reporting services or T-SQL code?
For T-SQL, you can use this formula:
DATEADD(hour, 7, DATEADD( Day, DATEDIFF(day, 0, GETDATE())-1,0))
November 28, 2013 at 9:38 am
Thank you. I am actually using reporting services
November 29, 2013 at 2:21 am
Hi
Try this:
=DateAdd(DateInterval.Hour,7,DateAdd(DateInterval.Day,-1,today()))
Br.
Mike
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply