working with dates

Asked

Viewed 28 times

0

Could you help me please, I have a column service date that based on it brings me the last day of that month and I calculate that data_final_month + payment deadline and from there I can know what is the final date that the customer has for payment .

select DATE_ADD(last_day(now()), INTERVAL 10 DAY); 

tried this script but it returns me depending on the current date, but I want it according to my column dataAtendimento.

1 answer

2

Hello,

You could build your query as in this example:

SELECT DATE_ADD(last_day(dataAtendimento), INTERVAL 10 DAY) as dataPagamento 
FROM `nome_da_sua_tabela`

Ps: change the above code table to your table name.

  • 1

    thank you Alexandre

Browser other questions tagged

You are not signed in. Login or sign up in order to post.