I am trying to get the Date & Time from Email.Headers(“Date”) which returns “Tue, 23 Jul 2024 14:00:13 +1200”.
The code I’m using is
Var s As String = "Tue, 23 Jul 2024 14:00:13 +1200"
Var dt As DateTime
dt = DateTime.FromString(s, New Locale("en-nz"), New TimeZone("Pacific/Auckland"))
Which is great at getting the date, but no time. I’m rather hoping I just need to use another Locale, but it may be a bug.
Any help will be appreciated.
12 posts - 6 participants