<p>The question is pretty self-explanatory. I'm looking for a PostgreSQL equivalent to the <a href="http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions" rel="nofollow noreferrer">SQLite datetime function</a>.</p>

```
```
postgres=# select to_char(now(),'YYYY-mm-dd HH:MM:ss');
       to_char
---------------------
 2008-09-24 02:09:20
(1 row)

postgres=# select to_char(now(),'YYYY-mm-dd HH24:MM:ss');
       to_char
---------------------
 2008-09-24 14:09:20
(1 row)
```
```