MySQL Forums
Forum List  »  MySQL Workbench

Re: Add different frequency days to dates
Posted by: Arrie Schoeman
Date: May 11, 2022 06:06PM

I use the DEFAULT and add the following (`base_date` + `frequency`). This must add the frequency to the date in base_date.

When I insert the following in base_date 2022-05-10 and the frequency is 10 (days) to the next inspection it gave me the correct date as 2022-05-30.

BUT when I enter a number of days like 60 (days) it doesn't do anything, then the error it shows that it add the 60 to 20220510 and shows ERROR 1292: Incorrect date value: '20220570' for column 'next_date' at row 2.
The DATA TYPE is base_date = DATE and the frequency = INT. The next_date is also DATE DATA TYPE.
I can't find a solution in the Reference Manual.

I hope you understand my problem now.

Options: ReplyQuote

Written By
Re: Add different frequency days to dates
May 11, 2022 06:06PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.