Обсуждение: problem with dates
This is a rather generic question about "date" and "time". I seem to be beating my head on the wall. I was trying to use a set up a table with a 'date' and 'time' field. I wanted to keep the two separate. Can someone explain if there is a difference between a time field and a timestamp. I don't mean the visual date and time as a single element. I mean in concept. I have been pouring through the docs and it appears from my reading that a 'date' field is supposed to act like the date portion of a timestamp. But it doesn't and I just don't understand why. if there is some document somewhere that explains this just point me to it. Thanks again. Ted
From: "postgresql" <pgsql@symcom.com> > This is a rather generic question about "date" and "time". I seem to > be beating my head on the wall. I was trying to use a set up a table > with a 'date' and 'time' field. I wanted to keep the two separate. > > Can someone explain if there is a difference between a time field > and a timestamp. I don't mean the visual date and time as a single > element. I mean in concept. I have been pouring through the docs > and it appears from my reading that a 'date' field is supposed to act > like the date portion of a timestamp. But it doesn't and I just don't > understand why. What isn't working correctly? I seem to be able to compare dates with timestamps and combine a date + time into a timestamp. > if there is some document somewhere that explains this just point > me to it. Look at the page "datetime-types.htm" in the docs (might only be in the docs for 7.1). - Richard Huxton