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: 
btpoole
Level 7

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
RokuMarkn
Level 7

Re: Change Date Order

Are you referring to roDateTime or something else?

--Mark
0 Kudos
EnTerr
Level 8

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
Level 7

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