DISPLAY CURRENT RUN TIME -12 HOURS IN REPORT HEADER

  • I am trying to display the report time frame in the header of the report.

    I have a report that retrieves date from current date - 12 hours. I am not I I tried below and I get yesterday.

    =DATEADD("h", -12,(today))

    if I run the report at 7:00 am I would like the start date to show

    mm/dd/yyyy 7:00 pm and the end date to show mm/dd/yyyy 7:00 am.

    I have no problem for my monthly reports

    First day of last month:

    =dateadd("m",-1,dateserial(year(Today),month(Today),1))

    can someone please help???

  • If you're getting the time the report was run, you can use the global variable Execution Time.

    =Globals!ExecutionTime

    You could get 12 hours before that using this:

    =DateAdd(DateInterval.Hour,-12,Globals!ExecutionTime)

    If you create a placeholder for each of the values, you can format them as Long Date (date and time).

    If you're getting the date/time value from a parameter, you'd just substitute Parameters!ParameterName for the Globals!ExecutionTime

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply