Username DateStart DateFinish
James 2017-07-01 2017-09-14
Luigi 2017-08-02 2017-09-18
Francesco 2017-09-03 2017-10-25
How calculate with sql difference between two date columns in days?
You can simply subtract them like
select "DateFinish"::date - "DateStart"::date;
And if the dates column are of datatype date then you can simply do:
select "DateFinish" - "DateStart"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With