loDateToFormatTransformation = Createobject('DateToFormatTransformation') ldDate = {^2008/01/01} ? loDateToFormatTransformation.getFormattedDate(ldDate, 'CCYYMMDD') ? loDateToFormatTransformation.getFormattedDate(ldDate, 'MMDDCCYY') ? loDateToFormatTransformation.getFormattedDate(ldDate, 'DDMMCCYY') ? loDateToFormatTransformation.getFormattedDate(ldDate, 'DDMMYY') ? loDateToFormatTransformation.getFormattedDate(ldDate, 'MMDDYY') ? loDateToFormatTransformation.getFormattedDate(ldDate, 'YYMMDD') define class DateToFormatTransformation as Session function getFormattedDate(tdDate as Date, tcFormat as String) as String local loTransformation, lcDate, loException loTransformation = Createobject(tcFormat) lcDate = loTransformation.getFormattedDate(tdDate) return lcDate endfunc enddefine define class CCYYMMDD as Session function getFormattedDate(tdDate as Date) as String return Dtos(tdDate) endfunc enddefine define class MMDDCCYY as Session function getFormattedDate(tdDate as Date) as String return Transform(Month(tdDate), '@L 99') + Transform(Day(tdDate), '@L 99') + Transform(Year(tdDate)) endfunc enddefine define class DDMMCCYY as Session function getFormattedDate(tdDate as Date) as String return Transform(Day(tdDate), '@L 99') + Transform(Month(tdDate), '@L 99') + Transform(Year(tdDate)) endfunc enddefine define class DDMMYY as Session function getFormattedDate(tdDate as Date) as String return Transform(Day(tdDate), '@L 99') + Transform(Month(tdDate), '@L 99') + Right(Transform(Year(tdDate)), 2) endfunc enddefine define class MMDDYY as Session function getFormattedDate(tdDate as Date) as String return Transform(Month(tdDate), '@L 99') + Transform(Day(tdDate), '@L 99') + Right(Transform(Year(tdDate)), 2) endfunc enddefine define class YYMMDD as Session function getFormattedDate(tdDate as Date) as String return Right(Dtos(tdDate), 6) endfunc enddefine