postgresql date to string code example Example: postgres convert date to string SELECT TO_CHAR(SYSDATE, 'YYYY-MM-DD') FROM dual;