Inverse function of FormatDateTime

后端 未结 7 622
自闭症患者
自闭症患者 2021-02-07 04:38

I am looking for a function to reverse any string (YYYYMDD,YY/MM/DD,YYMMDD,...) created by the function FormatDateTime to

相关标签:
7条回答
  • 2021-02-07 05:27

    You could use StrToDateFmt function of JvJCLUtils unit belonging to JEDI Code Library

    in your case :

    Function InvFormatDatetime ( dateString :String; dateFormat :String ) : TDateTime;
    begin
       Result := JvJCLUtils.StrToDateFmt ( dateFormat, dateString );
    end;
    
    0 讨论(0)
提交回复
热议问题