Hi, All
I need to parse ISO8601-formatted date got from API based on Django REST framework (Python language, if correct).
Date sample "2018-09-03T17:20:15.841985+07:00" is parsed well (after removing "T") by
by B4A 8.3 and JDK v.1.8.0.x.
But if to try to generate the same ISO8601 timestamp, according to the doc: https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html
"XXX" should give the required time zone "-08:00", but
Unclear why if "X" is OK for parsing.
Any suggestions ? (i see that manually add ":" into th result it's OK, but ... )
I need to parse ISO8601-formatted date got from API based on Django REST framework (Python language, if correct).
Date sample "2018-09-03T17:20:15.841985+07:00" is parsed well (after removing "T") by
B4X:
DateTime.DateFormat = "yyyy-MM-dd HH:mm:ss.SSSSSSX"
But if to try to generate the same ISO8601 timestamp, according to the doc: https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html
"XXX" should give the required time zone "-08:00", but
B4X:
DateTime.TimeFormat = "HH:mm:ss.SSSSSSX" 'gives...
java.lang.IllegalArgumentException: Unknown pattern character 'X'
Unclear why if "X" is OK for parsing.
Any suggestions ? (i see that manually add ":" into th result it's OK, but ... )
Last edited: