Thread: Perl date problem in myqsl
Results 1 to 2 of 2
08-23-2005, 08:31 AM #1
Perl date problem in myqsl
I have 3var to get date like this 2005-05-11(so I have var1=year-2005, var2=mounth-05, var3=day-11) and Im put this date to field1 in mysql,after I want to add 25 value to day and put new date in field2.... whan I add value 25 to var3(day) I get date 2005-05-36...So how I can tell that whan number come to 31 to go to other mounth and get date like 2005-06-05?????
Pleas I need this as soon as posible! Thx anyway
09-05-2005, 06:16 AM #2
Re: Perl date problem in myqsl
Use the mysql function DATE_ADD(). See the docs .
DATE_ADD( '2005-05-11', INTERVAL 25 DAY )