LarrySteele
Programmer
We're building an intranet site where users are able to upload a spreadsheet that ultimately goes into an Oracle (10g) table. We want to store the date columns from the spreadsheet into date fields. Using the to_date function would be fine if the dates' format was consistent. However, we're seeing any of the following come through:
[tt]
m-d-yy
m-dd-yyyy
mm/d/yy
mm/dd/yyyy
[/tt]
Of course there are more variations on a theme, but you get the idea.
What I want to know is how to convert strings to dates when the date format is unknown and can vary.
I've tried Googling the answer, but haven't been able to conjure up the right phrase. I can't be the first to encounter this, so I'm sure there's more than one solution, I just haven't bumped into it yet.
Thanks in advance.
[tt]
m-d-yy
m-dd-yyyy
mm/d/yy
mm/dd/yyyy
[/tt]
Of course there are more variations on a theme, but you get the idea.
What I want to know is how to convert strings to dates when the date format is unknown and can vary.
I've tried Googling the answer, but haven't been able to conjure up the right phrase. I can't be the first to encounter this, so I'm sure there's more than one solution, I just haven't bumped into it yet.
Thanks in advance.