I have a text value for date in this format “2010-01-30”.
When a day or month is not known, I have it shown as zero: “2010-0-0”
I now want to assign each part of this value, as 3 separate values which I will assign to $rYear, $rMonth, $rDay.
I can’t figure out how to get the value between the dashes for the month. I don’t think there is a php method that does this?
I have looked at some example functions people have written, but nothing that matches my scenario.
Could someone please help me out with this.
I also need to figure out a way to get the last digit for days, but hopefully once I figure out how to get the month value, I should be able to figure out how to get the day value.
Thank you.