The value returned is in a long, 24 hour format like 2023-05-30 19:48:44
Trying to figure out how to modify that to a shortened, 12 hour format, that also strips the leading 0 if present, as well as seconds and write it to a variable.
So 2023-05-30 19:48:44 would become 7:48
Here is my current script:
- Code: Select all
sunset = indigo.server.calculateSunset() #Indigo Sunset
indigo.variable.updateValue(489151405, format(sunset)) #Sunset into Variable
Any help would be appreciated.