| Date2Str Function | 
Unit
QESBPCSDateTime
Declaration
Function Date2Str(const DT: TDateTime): string;
Description
If ESBBlankWhenZero is true and the Date is Zero, then an Empty String will be returned.
If an error occurs an Empty String is Returned. If ESBRaiseDateError is true then an Exception is raised if a Date Conversion error occurs.
| Parameters | 
| DT | Date/Time to Convert. | 
Category
Date/Time Conversion RoutinesImplementation
 
| function Date2Str (const DT: TDateTime): string;
begin
     try
          if ESBBlankWhenZero and (abs (DT) < OneDTMilliSecond) then
               Result := ''
          else
               Result := DateToStr (DT);
     except
          Result := '';
          if ESBRaiseDateError then
               raise;
     end;
End; | 
|  |