mysql - Add days to a date -
i have table refering past, current , future events, column "start_date" (yyyy-mm-dd) , column "duration" (numeral value).
i want make query ("start_date" + "duration") >= current_date (in order extract data concerning current events)
is possible? how? can guess i'm new mysql
thanks lot
you need use date_add function
where date_add(start_date,interval duration day) >= curdate()
Comments
Post a Comment