How to insert a specific formatted date

I want to insert date of this format : 2017-08-24

Not really sure how and all the options KM provides are of different format. Perhaps I can do this with a shell script and pipe the output from that or is there an easier way?

I wish KM had year/month/day primitives we can compose things with.

See Dates and Times (KM Wiki).