Date with Timezone

I’m trying to convert string to date, and I keep running into this issue.

If I have a date like this 2011-10-11T19:25:00-04:00, it raises an error. I’m assuming it’s the T19:25:00-04:00, and that this is related to a timezone… I could be wrong however.

Does anyone know if this can be parsed in Xojo or if I have to disect it myself?

What is that string?
Time = 19:25:00 @ -4GMT?


Thanks in advance.

Parse it yourself and pass the values using the last Constructor in the documentation, which includes the GMTOffset.

Yep. Clearly that’s what I can do.
I was hoping to find out if this was a regular format that Xojo managed on its own. It’s not. I just have to detect the “T” and break it up from there.


The closest would be Date.SQLDateTime, but you’d still have to remove the “T” and parse our the GMT manually:

Dim d As New Date d.SQLDateTime = "2011-10-11 19:25:00" d.GMTOffset = -4

Exactly. thx.