posted 10 years ago
Oracle's date arithmetic represents differences of dates as a number of days. The fractional part represents part of a day. In your case, you're subtracting a midnight from a noon, which gives exactly one half of a day, thus 0.5.
the TIMESTAMP data type uses a different arithmetic (subtracting timestamps results in an interval datatype, for example), but I've always found subtracting the dates in the way mentioned above much easier to grasp. Of course, there are no timezones (and subsequently DST) in the DATE type, which makes the calculations much easier, but also imprecise if you need to reflect DST in your computations.