Jump to content

[SOLVED] date modification


lindm

Recommended Posts

I have the date as string in the format YYYY-MM-DD. Having problems finding a way to:

 

1. Add one day and remove one year (2006-12-31 would become 2006-01-01)

2. Remove -MM-DD (2006-12-31 would become 2006)

3. Only keep for instance 06 of 2006-12-31

 

Been looking at various date functions (http://se.php.net/manual/en/function.date.php) with no luck as well as str_replace...

Link to comment
https://forums.phpfreaks.com/topic/69379-solved-date-modification/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.