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: 
btpoole
Channel Surfer

Change Date Order

How can I change the date from YY-MM-DD to MM-DD-YY. I know the sdk has some info concerning this but nothing showing the command (that I see).
Thanks
0 Kudos
3 REPLIES 3
RokuMarkn
Visitor

Re: Change Date Order

Are you referring to roDateTime or something else?

--Mark
0 Kudos
EnTerr
Roku Guru

Re: Change Date Order

Assuming date in raw string form:
BrightScript Debugger> dateStr = "2014-11-4"
BrightScript Debugger> arr = dateStr.tokenize("-")
BrightScript Debugger> mm_dd_yy = arr[1] + "/" + arr[2] + "/" + arr[0]
BrightScript Debugger> ? mm_dd_yy
11/4/2014
0 Kudos
btpoole
Channel Surfer

Re: Change Date Order

Thank you EnTerr.

Mark,
I was referring to changing the order in which a date is returned from a parse of of a file.
0 Kudos