I have three variables:
1.) $year (e.g. "2018"),
2.) $month (e.g. "9" or "12"),
3.) $day (e.g. "5" or "21").
I want to merge them into one single variable ($date) in the format of YYYY-mm-dd, i.e. "2018-09-14".
Note that the month "9" and the day "5" now have "0" in front of them.
What would be the best way to do so?
Thank you!