i want to convert dates from format M/D/YYYY to YYYY-MM-DD:
ex. 11/7/2017 to 2017-11-07
the problem is that if the original date contains a single digit for month or day, i get a single digit in the converted date. (ex. 11/7/2017 becomes 2017-11-7 not 2017-11-07)
how do i pad the month and day to always display 2 digits?
i tried: $regexp(%releasetime%,(\d+)/(\d+)/(\d+),$3-$1-$num($2,2))
but this does not work, returns: 2017-11-00
any help with this would be appreciated, thanks.