Perfectly valid approach. A quick test shows that eval/strptime is about 30% faster (on my laptop) when comparing to rex/sed with a query against a little over 100k sample events, so if efficiency is important, I would consider that.
If you want to test in your environment, try
... | eval myDate = strftime( subname, "%Y-%m-%d")
It won't help you in your quest to learn more about the rex command, though. 🙂
... View more