Formatting date (weeks)

Hello everybody!

I need some help parsing dates. I have to read some periodic data from a file, and the date format given is a string ‘2011-05’, meaning its the fifth week of 2011. I have to transform this string to date (format dd-mm-yyyy) and then insert it into my mysql db.

I’ve tried to use some functions like date_parse_from_format ( string $format , string $date ) without success.

¿how can i make it?

Thx!

Sponsor our Newsletter | Privacy Policy | Terms of Service