Q:

Oracle - time and date format

I have an Oracle question, hope someone can guide me. I am using php and sql to select columns from a table. Part of the info I get is the time and date of when the column was created. For the moment I get the date in DD-MM-YYYY format. How can I change it so I can get it in YYYY-MM-DD format?
Thanks

A:

try
SELECT TO_CHAR ( MyDateColumn, 'YYYY-MM-DD' ) FROM MyTable

