Hi all,
im not a proffessional programmer (or speller for that matter) but i do do quite a lot of programming for friends and family, one of the main things i always have problem with is times and dates..
here is my problem.
i have a date/time field in a mysql database, which i need to pull..
i do so and have the result say
1976/06/23 00:00:00
now.. i need to add 1 month to that date.. i have tried allsorts, to do this, but fail every time..
in my last attempt, i took todays date, added one month and ended up with a date about 33 years ago.
can someone please explain as to how i do this. i have checked the php manual but it only tells you how to allocate 1 month to the date() function, and not to a pulled mysql db record..
for arguments sake,. lets say the variable that holds the date is
$newdate
any help would be appreciated..
tahnks
im not a proffessional programmer (or speller for that matter) but i do do quite a lot of programming for friends and family, one of the main things i always have problem with is times and dates..
here is my problem.
i have a date/time field in a mysql database, which i need to pull..
i do so and have the result say
1976/06/23 00:00:00
now.. i need to add 1 month to that date.. i have tried allsorts, to do this, but fail every time..
in my last attempt, i took todays date, added one month and ended up with a date about 33 years ago.
can someone please explain as to how i do this. i have checked the php manual but it only tells you how to allocate 1 month to the date() function, and not to a pulled mysql db record..
for arguments sake,. lets say the variable that holds the date is
$newdate
any help would be appreciated..
tahnks