MakeDateFromString
Function MakeDateFromString(&sDate) Returns date
Local date &dtRetDt, &dtNull;
Local number &nMonth, &nDay, &nYear;
If All(&sDate) And
&sDate <> "00000000" Then
&nMonth = Value(Substring(&sDate, 5, 2));
&nDay = Value(Substring(&sDate, 7, 2));
&nYear = Value(Substring(&sDate, 1, 4));
rem &fileBatch.WriteLine("&nMonth: " | &nMonth | "&nDay: " | &nDay | "&nYear: " | &nYear);
Return Date3(&nYear, &nMonth, &nDay);
Else
Return &dtNull;
End-If;
End-Function;
No comments:
Post a Comment