Skip to Content

Putting the "th" into the Date

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Dec 24, 2014 at 01:42 PM

    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")

    Add comment
    10|10000 characters needed characters exceeded