Ask Your Question
3

Transform the name of a column in an Oracle table to the format of month/day/year.

asked 2023-02-01 11:00:00 +0000

woof gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-08-24 02:00:00 +0000

qstack gravatar image

Assuming the name of the column is "datecolumn", you can use the TOCHAR function to transform it into the format of month/day/year.

The syntax would look like this:

SELECT TOCHAR(datecolumn, 'MM/DD/YYYY') AS newdatecolumnname FROM tablename;

This will convert the datecolumn into the format of month/day/year and rename it to newdatecolumnname in the output.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-02-01 11:00:00 +0000

Seen: 8 times

Last updated: Aug 24 '21