Oracle

Select distinct days from a date column in oracle database

Say now we have a requirement that there is a "created" column of DATE type in the "blogs" table that records the time stamp a blog is posted, and we need to display a list of days that have blog posts. In Oracle, we can use DATE functions to achieve this.

Oracle database DATE data type does not store timezone information

The Oracle database DATE data type does not store timezone information, so it will be good to consistently store GMT time in a DATE column and use the time in GMT in code. The idea is that we also save the current timezone of a user, so that the code can always calculate the local time of the user by shifting the GMT time.