Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

date/time format 1

Status
Not open for further replies.

vsn2009

Programmer
Jan 20, 2004
10
0
0
US
hi,
I have 270996.I want to convert it to date format(default).how is it possible??
thanks!!!
 
to_date('270996','ddmmyy')

Or you can use substr to break the dd, mm, yy into individual components and then use concat to concatenate them in the desired format . At the end use the to_date command to put it into date format.

a = 270996 (of char type)
dd = substr(a,1,2);
mm = subst(3,2);
yy = substr(5,2);
complete_date = dd||'-'||mm||'-'||yy ;
date_format = to_date(complete_date, 'dd-mm-yy');
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top