How to format date in a header(parameter)

  • I have the below code in my header I want my parameter to be displayed as MonthYear instead of 01/01/2012. I am using this parameters to run my report(01/01/2012) and therefore don't want to change it. I just want it to change only in my header from 01/01/2012 to just January, 2012 and help

    ="Inforce Active Account " & Parameters!BeginDate.Value & " To " & Parameters!EndDate.Value

  • gissah (7/2/2012)


    I have the below code in my header I want my parameter to be displayed as MonthYear instead of 01/01/2012. I am using this parameters to run my report(01/01/2012) and therefore don't want to change it. I just want it to change only in my header from 01/01/2012 to just January, 2012 and help

    ="Inforce Active Account " & Parameters!BeginDate.Value & " To " & Parameters!EndDate.Value

    Perhaps you could use a combination of 2 expressions, for example:

    =MonthName(DatePart(DateInterval.month,Parameters!BeginDate.Value),False)

    and

    =DatePart(DateInterval.year,Parameters!BeginDate.Value)

    This should return the Month of the BeginDate parameter as the name of the month (as a string) and the year (as an integer)

  • Could also go for this

    =FORMAT(Parameter!......................., "MMMM, yyyy")

    Can try experimenting with the formatting, one thing to note capital M is month lower m is minutes

  • Thank you all it was all helpful

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

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