"20120325160745"(string) 实际代表 2012-03-25 16:07:45 怎样把它变成 datetime
------解决方案--------------------
- C/C++ code
string ls = '20120325160745'datetime ldtldt = datetime(date(left(ls, 4) + '-' + mid(ls, 5, 2) + '-' + mid(ls_ 7, 2)), time(mid(ls, 9, 2) + ':' + mid(ls, 11, 2) + ':' + mid(ls, 13, 2)))
------解决方案--------------------
顶!
------解决方案--------------------
string text = '20120325160745'
datetime ldt
ldt = datetime(date(string(long(left(text, 8)), '####-##-##')) + time(string(long(mid(text, 9)), '##:##:##')))