jazz
jazz

Reputation: 153

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

Upvotes: 0

Views: 410

Answers (1)

Yahia
Yahia

Reputation: 70369

try

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

Upvotes: 3

Related Questions