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

  • Home
  • SEARCH
  • 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 table that is is sorted 1st by Reminder Date then ID
the problem I'm facing is this: I have a textbox for a date range
I've skimmed thru Date and Silberschatz but can't seem to find answers to these
I want to extend the asp.net validators such that I can make one validator
When you add an item to the System.Web.Caching.Cache with an absolute expiration date, as
My insert stored procedure: ALTER procedure proj_ins_all ( @proj_number INT, @usr_id INT, @download DATETIME,
I'm quite new to iphone programming and I want to do the following stuff:
I'm trying to use Apache Commons Net for FTP file transfers. Problem is files
Is it in usercontrols / xslt renderings possible to check wheter an item has

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.