• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with sql query to_date

 
Sanny kumar
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys,

i want to select the records the records in the table using order by desc clase.

i want to convert the varchar to date.
for example the record inserted like 11/5/2005 08:30 (varchar datatype).
i want to convert the varchar2 to to_date format.
i m using to_date function to convert..but i m getting the error format code apperars twice.

i m getting error when i have records like this

11/18/2005 9:00(mm/dd/yy hh:mm)
11/5/2005 9:21 (mm/dd/yy hh:mm)


any suggestion plz?

Thanks in advance
Santhosh
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you please show the query.
 
Maximilian Xavier Stocker
Ranch Hand
Posts: 381
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I really think the best suggestion for you is to convert the varchar field into a date type of field.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic