Convert String to Date and Format the Date Expression in SSRS

    General discussion

  • Hi,

    I have a parameter used to select a month and year  string that looks like:    jun-2013

    I can convert it to a date, but what I want to do is,  when a user selects a particular month-year  (let's say "jun-2013")

    I  populate one text box with the date the user selected , and (the challenge Im having is)  I want to populate a text box next to the first text box with the month-year  2 months ahead.    So if the user selects  jun-2013   textbox A will show  jun-2013 

    and textbox B will show  aug-2013..

    I have tried:

    =Format(Format(CDate(Parameters!month.Value  ),  

    "MM-YYYY"  )+ 2  )   -- But this gives an error

    This returns the month in number format   like "8"    for august...

    =Format(Format(CDate(Parameters!month.Value  ), 

    "MM"  )+ 2  )


    What is the proper syntax to give me the result    in this format =  "aug-2013"  ???

    Thanks in advance.


    M Collier

    Monday, April 28, 2014 2:22 PM