Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 511725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:14:47+00:00 2026-05-13T07:14:47+00:00

It so happens that I have to get a date from a varchar2 column

  • 0

It so happens that I have to get a date from a varchar2 column in oracle, but it is inconsistent in formatting. Some fields might have ‘2009.12.31’, others ‘2009/12/32 00:00:00’. Is there any standard construct I could use, so that I don’t have to go through

begin
  to_date(date, mask1)
exception
  begin
    to_date(date,mask2)
  exception
    ..
  end
end

blocks or prior date string analysis to determine the correct mask? Something like to_date(date, mask1,mask2,..) ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T07:14:48+00:00Added an answer on May 13, 2026 at 7:14 am

    No, but some Oracle date formats are “forgiving” of differences e.g.

    SQL> select to_date('2009.12.31','YYYY/MM/DD') from dual;
    
    TO_DATE('20
    -----------
    31-DEC-2009
    

    So that may reduce the amount of cases you need to handle. I suggest you write a function along the lines you were thinking of, so that it can be called from all the places in your code where you need to handle dates like this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem that happens in IE 8 and Firefox 6.0 but not
I have a property on a class that happens to be a Table<T> .
I have a text box whose content is constantly changing and whenever that happens,
I have a jsfiddle here . What happens is that if you select a
I have a Hgroup that contains of four panels. Sometimes it happens then when
I have one main parent swf that loads several other swfs. If something happens
I have this annoying problem, that Im pretty sure happens to all of you
I have a table that is is sorted 1st by Reminder Date then ID
I have read that grouping happens before ordering, is there any way that I
I have a link marked :remote => true that makes a get request to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.