Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
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
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.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.