Android Question DateFormat with Time Zone

Creideiki

Active Member
Licensed User
Longtime User
Hi,

I need a iso date string. This should be
B4X:
DateTime.DateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX"

But this works only in newer Android versions. In older versions (e.g. 5.0, 6.0) it crashes (Unknown pattern character 'X').

I now replace 'XXX' with '+02:00' in the catch, but that seems a bit clumpsy...

Is there a better way to create the time zone in older Android versions?

Thanks
 

Creideiki

Active Member
Licensed User
Longtime User
Hi Erel,
I see... it works with older versions, but gives me +0200 instead of +02:00, which seem to be allowed in ISO 8601.
So I have to check with the other software if that work together.

Thank you.
 
Upvote 0
Top