All these different date types confuse me. There’s datetime, timestamp, date, and who knows what else. If I need to keep track of a date but would also like to pull queries that says “find records between 06/01/2010 and 06/30/2010,” which field type should I be using? At the moment, I’m using “date” because I have no need for a timestamp or time itself.
I think postgresql only has one field type for a date, but it can be formatted via a SQL function I believe. 🙂
Date is correct for what you want.
Why so many options? Well, a database could just have 1 type, let’s take BLOB – but it wouldn’t be very useful. It’s nicer if your system knows what kind of data it’s handling, so it can offer you special functions (like, as you said, finding dates between given dates).
The different types: