How can I best store a String with format yyyy-MM-dd (without time declaration) in SQL database (postgres)?
I later want to use that String always as Date
type. I also want to execute query against the database to give me records that are before or after that Date.
- Should I store it as a String or as a Date type in DB?
- If I store it as a Date, in database I see
yyyy-MM-dd HH:mm:ss
. How could I prevent the time declaration?