Jump to content

How Would I Go About Adding To The Current Date In Mysql?


3raser

Recommended Posts

I have several units (days, weeks, years) I'd like to add to the current date in MySQL. How would I go about doing this?

 

I tried:

 

ADDDATE(CURRENT_DATE(), INTERVAL {$length[0]} YEAR INTERVAL {$length[1]} MONTH INTERVAL {$length[2]} WEEK INTERVAL {$length[3]} DAY)

 

But doesn't work. Can you even add multiple intervals?

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.