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 3496796
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:17:35+00:00 2026-05-18T12:17:35+00:00

I insert into an Oracle DB Table using the following insert string (Approx —

  • 0

I insert into an Oracle DB Table using the following insert string (Approx — There’s 140 columns so I won’t show it all):

“INSERT INTO AMS_ASSET_CS_IFACEOUT VALUES ( ‘abcdef’, ‘abcdef’, to_date(‘2010-01-31’, ‘YYYY-MM-DD’), … )”

Then a couple of seconds later I run the following code snippet:

    /// <summary>
    /// Function: GetRecord
    /// Description: Creates a new AMS-Asset and populates the
    /// properties of this asset by evaluating properties provided
    /// by the OracleDataReader.
    /// </summary>
    /// <param name="reader"> One record of information from the open connection.</param>
    /// <returns> A fully created AMS-Asset record. </returns>
    private static AmsAsset GetRecord(OracleDataReader reader)
    {
        AmsAsset newRecord = new AmsAsset();

        for (int propertyIndex = 0; propertyIndex < reader.FieldCount; propertyIndex++)
        {
            string propertyName = reader.GetName(propertyIndex).ToLower();
            string propertyValue = reader.GetValue(propertyIndex).ToString();
            int propertyValueAsInteger = 0;

            bool isPropertyAnInteger = Int32.TryParse(propertyValue, out propertyValueAsInteger);

            if (isPropertyAnInteger)
            {
                newRecord.GetType().GetProperty(propertyName).SetValue(newRecord, propertyValueAsInteger, null);
            }
            else
            {
                newRecord.GetType().GetProperty(propertyName).SetValue(newRecord, propertyValue, null);
            }
        }

        return newRecord;
    }

The date value I inserted into my database is now returned as “1/31/2010 12:00:00 AM.”

I’m not entirely sure why… What are my options? Do I need to just code a conversion from the format I’m being given back into ISO

Regards,

Sean Anderson

  • 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-18T12:17:35+00:00Added an answer on May 18, 2026 at 12:17 pm

    Since you inserted into Database using an unambiguous ‘YYYY-MM-DD’ format date, it is correctly stored in database.

    When you read it out and display that date, the format is dependent on your regional settings.

    I suggest you use an explicit format specifier for displaying.

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

Sidebar

Related Questions

I've got an insert into a table using ODBC 3.0 on Oracle 10g that
I am trying to insert records into a table using insert....select...stmt in a oracle
On Oracle 10g we need to insert records from a view into a table
I'm using following update or insert Oracle statement at the moment: BEGIN UPDATE DSMS
There is a table in Oracle with the columns: id | start_number | end_number
I have several transactions to insert form data into oracle table. if (InsertQuarterly() ==
I'm trying to insert over 100,000 records into an Oracle 9i table with no
I am trying to INSERT INTO a table using the input from another table.
I have to insert many product value records into an Oracle table. I get
I am trying to insert values into Oracle 10g database using the code below

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.