I'm passing an ISO 8601 formatted date string to a Function, and then manipulating it.
I can `Split()` it, and the split creates an Array, and I can use bracket notion on it as expected.
But my attempts to `Reverse()` the Array only manage in my getting an `<UNINITIALIZED>` response.
Function getDate(timestamp as String) as Object
datestamp = timestamp.Split("T")[0]
dateArray = datestamp.Split("-")
yarrAetad = dateArray.Reverse()
? timestamp
? Type(timestamp)
? dateArray
? Type(dateArray)
? yarrAetad
' return dateArray
return true
end Function
and the Console logs:
2018-11-17T15:20:00Z
String
<Component: roArray> =
[
"17"
"11"
"2018"
]
roArray
<UNINITIALIZED>
I can work around the issue, obviously, but I wondered if there was something I needed to do programmatically to get the correct response from my code?
_______________________________________________________________________________
Craig Sharkie
Connected TV Lead, Engineering – EDS & OD
sbs.com.au