Date Intrinsic Functions - AsDisplayString Method

Convert the variable to a formatted string

Member of Date Intrinsic Functions (PRIM_LIBI.IDateIntrinsics)


NameTypeData TypeDescription
Result*Result (Optional)StringResulting string
Format*Input (Optional)EnumerationFormat of the date


AsDisplayString returns the supplied date formatted using one of the available supplied date formats.

Allowed Formats

Enum ValueDescription
CCYYDDMMe.g. 20143112
CCYYMM e.g. 201431
CCYYMMDD e.g. 20141231
CCYYsDDsMM e.g. 2014/31/12
CCYYsMMsDD e.g. 2014/12/31
DDMMCCYY e.g. 31122014
DDMMMCCYY e.g. 31Dec2014
DDMMMYY e.g. 31Dec14
DDMMYY e.g. 311214
DDsMMsCCYY e.g. 31/12/2014
DDsMMsYY e.g. 31/12/14
DDxxbMMMMMMMMMbCCYY e.g. 31st December 2014
DDxxbMMMMMMMMMbYY e.g. 31st December 14
ISO e.g. 2014-12-31
ML_DDbMMMMMMMMMbCCYY e.g. 31 December 2014 (Multilingual)
ML_DDbMMMMMMMMMbYY e.g. 31 December 14 (Multilingual)
ML_DDDDDDDDD e.g. Wednesday (Multilingual)
MMCCYY e.g. 122014
MMDDCCYY e.g. 12312014
MMDDYY e.g. 123114
MMMMMMMMMM e.g. December
MMsDDsCCYY e.g. 12/31/2014
MMsDDsYY e.g. 12/31/14
MMYY e.g. 1214
SysFmt6 e.g. 311214 (Operating system format)
SysFmt8 e.g. 31122014 (Operating system format)
xYYMMDD e.g. 1141231 (First digit is 1 if the date is later than the LANSA year comparison value, otherwise it's 0)
YYMM e.g. 1412
YYMMDD e.g. 141231
YYsMMsDD e.g. 14/12/31


In this example, the date 2010-05-31 would return the value "31st May 2010".
#Result := #Today.AsDisplayString( ML_DDbMMMMMMMMMbCCYY )

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2