0
I have a date column data_novo
and I want to know how many days the product is open, I have to make a subtraction account between the "system date" and the date that is in the column data_novo
. And this result will be displayed in another column (e.g. open days)?
I tried the following:
diferença= DATETIME-DAT_ABER
I have no idea how to do it. Can you please help me?
diferenca = getdate() - dat_abert
– Reginaldo Rigo
I tried that way and it didn’t work.
– Maikol Oliveira
Are you going to perform an update? I don’t understand this:
esse resultado vai ser exibido em outra coluna
– Marconi
Is that it? http://sqlfiddle.com/#! 18/9eecb/21540
– Marconi