How to change date format DD MMM YYYY

Hi,

 

I have a date formatted line item (example: 4/1/2020) - this is in mm/dd/yyyy format

However, i want to show as 1 April 2020 or 1 Apr 2020.

How do I do that?

Best Answers

  • To create the name of the month you need create a new list for the months of the year. Use the month number as the code and map your month number in you module to the code in the new list using FINDITEM.

     

    To combine them into a single line item convert you items into TEXT format and concatenate them using "&" to separate each source line item.

     

    Good luck,

  • Hi @Kayley 

     

    To achieve the display with month name,

    Create a list (Eg. Month) with month number, code should also be month number

    Add a property to the list for month name (Eg. Month Name)

    List.png

    In the module create line item to refer to month using FINDITEM() and LOOKUP()

    Concatenate the results (date, month name, year) as per desired format using &

    Sample attached below with formula,

    Date Format 1.png

     

    Month (List)   :    FINDITEM(Month, TEXT(MONTH(Date)))

    Month Name  :    Month.Month Name[LOOKUP : Month (List)]

    Date (Text)    :    TEXT(DAY(Date)) & " " & Month Name & " " & TEXT(YEAR(Date))

     

    Thanks,

    Nithya

     

     

  • this is too complex for this. 

     

    You can achieve it faster with this:

    nathan_rudman_0-1608127026744.png nathan_rudman_1-1608127044338.png

     

     

     

     

Comments

  • Hi @Kayley 

    The date format in Anaplan is presented based on user browser settings, which would either be represented as DD/MM/YYYY or MM/DD/YYYY.

    However, to represent the date in any other format apart from the above such as DD MMM YYYY, a separate line item formatted as text can be created with custom formula referencing date line item to achieve the same.

     

    Thanks

    Nithya

  • Hi @Nithya 

     

    Thank you for your reply. 

     

    Yes, i have created a separator to identify the Day, Month and Year as per image below. However, i'm not sure how to change the numeric month 4, to April and I'm not sure how to combine the day month and year together in a line item, so that it read 1 April 2020.

    Kayley_0-1608123677258.png

    Kayley_1-1608123761110.png

     

     

  • Hi @nathan_rudman , @Nithya , @ChrisAHeathcote 

     

    Thank you so much all for your solutions! It works now! 😁

  • @Kayley 

     

    @nathan_rudman solution is the best as it will perform the best (less concatenations, no lookup, all around better for Hyperblock)  and it is easy to follow for other model builders.

  • @nathan_rudman 

    A nice simple solution. As a solutions should be!

    Bravo!

  • How do you change them in Chrome? I've tried change them but it doesn't work