How do I convert an ISO 8601 string to a Delphi TDate?

前端 未结 7 1377
北海茫月
北海茫月 2020-12-06 05:09

I can convert a Delphi TDate to ISO 8601 format easily using this:

DateTimeToString(result, \'yyyy-mm-dd\', myDate);

What\'s the idiomatic

相关标签:
7条回答
  • 2020-12-06 05:47

    From XE8 onwards, use ISO8601ToDate (and DateToISO8601) from dateutils.pas.

    http://docwiki.embarcadero.com/Libraries/XE8/en/System.DateUtils.ISO8601ToDate

    0 讨论(0)
提交回复
热议问题