The query below returns a table with data type time stamp without time zone. How do I format this query so it removes the timestamp and just save the date?
SELECT *
FROM dblink('dbname=mydb', 'select startdate from study') as t1(start timestamp without time zone);
Output:
|-----------start-------|
| 2012-03-19 00:00:00 |
| 2012-04-26 00:00:00 |
| 2012-05-01 00:00:00 |
| 2012-06-01 00:00:00 |
| 2012-07-01 00:00:00 |
| 2012-08-01 00:00:00 |
| 2012-02-07 00:00:00 |
| 2012-04-26 00:00:00 |
| 2012-09-01 00:00:00 |
| 2012-12-01 00:00:00 |
| 2013-11-11 00:00:00 |
+-----------------------+
What I'm looking for:
|------start---|
| 2012-03-19 |
| 2012-04-26 |
| 2012-05-01 |
| 2012-06-01 |
| 2012-07-01 |
| 2012-08-01 |
| 2012-02-07 |
| 2012-04-26 |
| 2012-09-01 |
| 2012-12-01 |
| 2013-11-11 |