postgres convert date to string 1

postgres convert date to string


Here is what the above code is Doing:
1. We’re using the TO_CHAR function to convert the SYSDATE function to a string.
2. We’re using the ‘YYYY-MM-DD’ format model to specify the format of the date.
3. We’re using the dual table to select from.

The dual table is a special one-row, one-column table present by default in Oracle and other database installations. It’s useful for selecting a pseudo column such as SYSDATE or USER.

Here’s the output of the above code:


Similar Posts