I for one can't tell what you are asking. May be a reason why you have no replies. Are you saying the date was entered wrongly?
Ok, I seen loooodes of threads on this elsewhere but no proper answer:
In a MySQL table there is a date in the format of yyyy-mm-dd. I want to add 30 days onto that. It qould probably be done by PHP, or my a MySQL table. But remember you must take into account the amount of days in each month etc. Its a hard problem to solve and as far as I've seen PHP or SQL dosn't have any functions to do it directly. Has anyone got any help at all?
I for one can't tell what you are asking. May be a reason why you have no replies. Are you saying the date was entered wrongly?
I'm using Windows 7 - you got a problem with that?
Just add 30 days worth in seconds:
30 days = 2, 592 ,000 seconds
Theres a mySQL function to do that.
Many thanks to egghead for the cool .sig
$newdate = mktime(0, 0, 0, date("m") , date("d")+30, date("Y")); could solve your problem.
![]()
Hello jellewar
Thanks a lot for this posting. Iam still looking for some IDE to learn PHP programming. May be phpDesigner is the right one to start with.
HP
Bookmarks