cancel
Showing results for 
Search instead for 
Did you mean: 

Putting the "th" into the Date

gleo_SRAM
Active Contributor
0 Kudos

Hi everyone,

I have all the standard date format options, but not the one I want

Rather than display   "December 24 2014", I want to display "December 24th 2014"  or   "Jan 1st 2015" rather than "Jan 1 2015".

Suggestions would be welcome!

Many thanks

Gill

Accepted Solutions (1)

Accepted Solutions (1)

sateesh_kumar1
Active Contributor
0 Kudos

HI Gill,

Create a variable

Suffix

=Substr("thstndrdth";

If(9<(2*ToNumber(Right(FormatNumber(DayNumberOfMonth(CurrentDate());"#");1))*((If(DayNumberOfMonth(CurrentDate())<11;89+DayNumberOfMonth(CurrentDate());Mod(DayNumberOfMonth(CurrentDate())-11;100)))>2)+1);9;(2*ToNumber(Right(FormatNumber(DayNumberOfMonth(CurrentDate());"#");1))*((If(DayNumberOfMonth(CurrentDate())<11;89+DayNumberOfMonth(CurrentDate());Mod(DayNumberOfMonth(CurrentDate())-11;100)))>2)+1));2)

Final output

=Month(CurrentDate())+" "+ DayNumberOfMonth(CurrentDate())+[Suffix]+" "+FormatDate(CurrentDate();"yyyy")

gleo_SRAM
Active Contributor
0 Kudos

Many thanks Sateesh!

Answers (0)