I have folowing code:
SELECT @daysAgo=DATEDIFF(dd,LDatum, @LDatum) from LeistungenListe
In DB LDatum has value '2011-07-04 00:00:00' now when I specify in my application as a date '2011-07-04 01:00:00' it returns me 1 day.
However when I specify '2011-07-03 12:00:00' I get 0 days. So it seems that somehow time 00:00 is treated as 23:59.
Is it right behaviour? How I can fix this without easy + 1 :)