Answered
SQL dates
This is my first time on an sql server. In my table, I have a
start_date and end_date defined as datetime for the datatype. I
just want to do a simple date calculation :
<td>#datediff('d',qryGet_Report.start_date,qryGet_Report.end_date)#</td>
If the start_date and end_date are the same, the calculation comes out to zero. But if they are different, the calculation always appears to add one day, for example if start_date is 08/10/2007 and end_date is 08/12/2007, it should be 2 days, but it shows 3 days. I do not have this problem with access db, like I said, this is my first time on the sql server, so what is happening and what am I doing wrong ?
If the start_date and end_date are the same, the calculation comes out to zero. But if they are different, the calculation always appears to add one day, for example if start_date is 08/10/2007 and end_date is 08/12/2007, it should be 2 days, but it shows 3 days. I do not have this problem with access db, like I said, this is my first time on the sql server, so what is happening and what am I doing wrong ?
