We help IT Professionals succeed at work.
Get Started

date_format

sam15
sam15 asked
on
1,631 Views
Last Modified: 2013-12-19
I have a table with date column "Book_Date"

The date is sent by a client program over http and can be in different format. Now i have

insert into table (book_date) values (to_date(p_book_date,'DD-MON-YYYY'))
I found that client does not have control over format as it extracts it from a disk prepared by a vendor. it send "YYYY-MM-DD" and oracle resulted in error.

It can be in several formats:
YYYY-MM-DD
DD-MON-YYYY
MM-DD-YYYY
NULL
etc.

Is there a good way to handle the different formats and save data as a date and not reject what is being sent?

Comment
Watch Question
CERTIFIED EXPERT
Top Expert 2005
Commented:
This problem has been solved!
Unlock 1 Answer and 10 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE