Change Object Format? Numerical Date to Text Format?

Hi,

I have a business object called YearMonth. The data pulls in as: 202203 to represent March 2022. I don’t see any other objects that can give me this but I really want the format to be March 2022 rather than 202203. Is there a way I can get this object to display in a more reader friendly format?

1 Like

You have to force the number to become a date:
=FormatDate(ToDate([YearMonth]*100+1;"yyyyMMdd");"Mmmm yyyy")

That assumes YearMonth is an integer. If it’s a string, use this:
=FormatDate(ToDate([YearMonth]+"01";"yyyyMMdd");"Mmmm yyyy")

Any questions, just ask.

3 Likes

@MarkP Thanks man. I have serious respect for these forums. I really appreciate the help I get here. Your second formula did the trick.

1 Like

You can simplify using ToDate and the yyyyMM format:

= FormatDate( ToDate( “202203” ; “yyyyMM” ) ; “Mmmm yyyy” )

3 Likes