Mitech Preloader

Format a date in archaic form

Cookbook

Format a date in archaic form

Suppose you want to format a date in the old style, with diphthongs 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(DateOfSignature,’yyyy’))».

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