function GetStrDate(datestr:string):string; //20190101000021 返回 2019-01-01 00:00:21
var
str : string;
begin
str := copy(datestr,1,4)+'-'+ copy(datestr,5,2)+'-'+copy(datestr,7,2)+' '+ copy(datestr,9,2)+':'+copy(datestr,11,2)+':' +copy(datestr,13,2) ;
result:=str;
end;
function GetDateStr(datestr:string):string; //2019-01-01 00:00:21 返回 20190101000021
var
str : string;
begin
str := copy(datestr,1,4)+ copy(datestr,6,2)+copy(datestr,9,2)+ copy(datestr,12,2)+copy(datestr,15,2)+copy(datestr,18,2) ;
result:=str;
end;
Copyright © 2014 DelphiW.com 开发 源码 文档 技巧 All Rights Reserved
晋ICP备14006235号-8 晋公网安备 14108102000087号
执行时间: 0.04463005065918 seconds