Developers

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

roDateTime fromISO8601String

I'm trying to use the method `fromISO8601String` but it always returns "<UNINITIALIZED>", no matter the string I pass in.

Even creating a new date, pulling the current date and converting that has the same result:
   date = CreateObject("roDateTime")
   currentISODate = date.ToISOString()
   isoDate = date.FromISO8601String(currentISODate)
   print isoDate
Tags (1)
0 Kudos
1 REPLY 1
belltown
Roku Guru

Re: roDateTime fromISO8601String


isoDate = CreateObject("roDateTime")
isoDate.FromISO8601String("2018-10-01T20:45:31Z")
print isoDate.ToISOString()
2018-10-01T20:45:31Z

FromISO8601String() doesn't return anything. It sets the date object to the specified date.
Tags (1)
0 Kudos
Community is Being Upgraded!

We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. Read more here.

Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 19th and you may notice reduced functionality. In the meantime, for additional assistance, visit our Support Site.

We're sorry for this disruption — we’re excited to share what’s next!