Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
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
0 Kudos
1 Reply
belltown
Level 7

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.
https://github.com/belltown/
0 Kudos