I have created a formula called @DateCode: WhilePrintingRecords;NumberVar dblYear:= 0;NumberVar dblWeek:= 0;StringVar strYear:= "00";StringVar strWeek:= "00";StringVar strDate:= {OrderDet.User_Text1};DateVar dtDate;DateTimeVar dtDateTime;StringVar strDateCode:= "0000"; If IsDate(strDate) Then(...