Hello i have a table with 2 dates (format d-m-yyyy h:mm:s, example: 3-12-2007 9:05:03)
Is it possible to get the days between those dates?
I have the following table:
date1 date2
------------------------ ---------------------
2-12-2007 23:00:00 3-12-2007 9:06:38
1-12-2007 10:24:23 3-12-2007 9:06:38
4-12-2007 23:00:00 10-12-2007 9:06:38
2-12-2007 23:00:00 15-12-2007 10:24:23
2-12-2007 10:24:23 15-12-2007 9:06:38
I want the result like below
date1 date2 days
------------------------ --------------------- -----
2-12-2007 23:00:00 3-12-2007 9:06:38 1
1-12-2007 10:24:23 3-12-2007 9:06:38 2
4-12-2007 23:00:00 10-12-2007 9:06:38 6
2-12-2007 23:00:00 15-12-2007 10:24:23 13
2-12-2007 10:24:23 14-12-2007 9:06:38 12
Start Free Trial