Format a date in archaic form

Suppose you want to format a date in the old style, with ordinal suffixes after the day number, etc., rendering “2009-06-23” as “the 23rd day of June in the year of Our Lord Two Thousand And Nine”.

 

This is easy enough to achieve using the ‘o’ parameter in the FormatDate() command. The above example would be achievable like this:

the «FormatDate(DateOfSignature,'o')» day of «FormatDate(DateOfSignature,’MMMM’)» in the year of our Lord «NumberPhrase(FormatDate(DateOfSignature,’yyyy’))».

 

However, should you want the suffix to be superscripted then you would use the OrdinalSuffix command, like this:

the «FormatDate(Date_Signed,’d’)»«OrdinalSuffix(FormatDate(Date_Signed,’d’))» day of «FormatDate(Date_Signed,’MMMM’)» in the year of our Lord «NumberPhrase(FormatDate(Date_Signed,’yyyy’))».

 

To save yourself from having to rewrite this snippet of code in multiple templates you could save it in a parameterized script which could be used over and over. Like this:.

First define the script:
«Script(LongDate,Date)»«FormatDate(&Date&,’d’)»«OrdinalSuffix(FormatDate(&Date&,’d’))» day of «FormatDate(&Date&,’MMMM’)» in the year of our Lord «NumberPhrase(FormatDate(&Date&,’yyyy’))»«ScriptEnd()»

 

Then use the script:
«LongDate(My_Date)»

Click here to watch a video on how to create parameterized scripts.

For more details please have a look at The FormatDate and IncrementDate Functions and The OrdinalSuffix Function.