Oracle Date Time, Convert Timestamp to Char

SISINDOTEK TIPS

Just a picture of 99% of the date variations listed in the book, although I’m saving timestamps for another post.

The Easy Way
Select To_Char(Sysdate,’DL’ ) DL /* long date */
, To_Char(Sysdate,’DS’ ) DS /* short date */
, To_Char(Sysdate,’TS’ ) TS /* short time */
, To_Char(Sysdate,’DS TS’) DSTS /* short date, time */
From Dual;
DL | DS | TS | DSTS

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s