rounding date range to number of months

  • Hello, I am new to this forum but I can't seem to get the answer I need elsewhere...

    I think this is a reporting services question. I have a report that prompts for date range params:

    equipdet.gldate BETWEEN @fromdate AND @thrudate

    Is there a way in the layout to have an expression that takes the date range and totals the number of whole months? Example; 1/1/09 through 3/31/09 would equal 3 months. I then would like to multiply the number of months by one of the Field Values. I think the hard part here for me is to know if I can do the date range part.

    Thanks in advance.

  • Hi jneff,

    This is possible.

    Use the below function to calculate the date difference

    =DATEDIFF("m", Parameters!FromDate.Value,Parameters!ToTime.Value)

    -----------------------------------------------------------------------------------------------------------------------------------------------------------
    Please feel free to let me know if you are not clear or I’ve misunderstood anything.

    Thanks,
    Arunkumar S P

  • That is exactly what I was looking for. Thank you very much.

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

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