5 Replies Latest reply on Oct 2, 2015 8:01 AM by 1034244

    convert date to MM/YYYY

    2885278

      Helo guys

       

       

      I have an issue how to cast Date type (DD/MM/YYYY) to format like this "MM/YYYY".

       

      when User chooses Period for example 12/31/2014 from Dashboard Prompt then in Column Heading will be Dec/2015.


      See the following picture:

       

      It's dashboard prompt

      10-1-2015 11-15-15 AM.png

      and Report will display like following

      10-1-2015 11-15-29 AM-2.png

       

      Guys would you please to suggest me or giving an advises how to deal this issue. Thanks a million to share to suggestion and advises.I really appreciate it.

        • 1. Re: convert date to MM/YYYY
          Gianni Ceresa

          Hi,

          Are you using a presentation variable to display the selected date in column header of your table?

          • 2. Re: convert date to MM/YYYY
            Gianni Ceresa

            Assuming you are using a presentation variable you can add a format mask to it:

            @{your_presentation_variable_name}[MMM/YYYY]
            

             

            This will give you your "Dec/2014" on the screen.

            • 3. Re: convert date to MM/YYYY
              1034244

              Dear Gianni,

               

              Yes, that's working.

              I have the same scenario like this ..

              In the report, I am calculating the Current Month YTD and Previous month YTD and I am using the column heading as presentation variable for current month. And also I need to get the Previous month for Previous month YTD.

              When I select the prompt as Dec-14, the column heading displays current month as Dec-14 and for the Previous month I need to get it as Nov-14.

              How can we achieve this. Is this possible using presentation variable?

               

              Thanks

              • 4. Re: convert date to MM/YYYY
                Gianni Ceresa

                Where does the previous month come from? Is it in a variable?

                I'm almost sure it's not a variable, so can't add it in the column heading for now: problem solved ...

                 

                If you now change the question to makes it "how do I get the previous month in a presentation variable so I can use it in the column heading field", this is a new question not related with the first one. I would suggest to start a new thread for it or this thread will become "how do I make my report piece by piece" and so it will be useless for anybody else but you. As this is a community forum threads are supposed to be helpful for a maximum of people, it's why they are supposed to be single-topic.

                So close this one, flag the required posts to help others looking on how to format a date presentation variable and start a new one focusing only on your new question.