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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:46:56+00:00 2026-05-27T23:46:56+00:00

I am trying to insert data in oracle express 10 g table. My table

  • 0

I am trying to insert data in oracle express 10 g table.

My table contains following Columns:

Field Name                           Data Type

 ATDATE                               DATE
 ATTIME                               VARCHAR2(5)
 EMPNO                                NUMBER(8)
 INOUTIND                             CHAR(1)
 TRTNO                                CHAR(3)
 FLAG                                 NUMBER(2)
 STATUS                               CHAR(1)
 LUPDT                                DATE

Now when I am trying to insert data from my C# Windows application I am getting error

ORA-01861 : literal does not match format string”

So how can I solve it?

I am writing insert command in the Form itself using OracleCommand.


OracleCommand cmd = new OracleCommand("INSERT INTO TMPATND values(:Atdate,:Attime,:Empno,:Inoutind,:Trtno,:Flag,:Status,:Lupdt)", con); 

:Atdate,:Attime etc are parameters. e.g: cmd.Parameters.AddWithValue(":Atdate","20120103");

In which format I should pass the date? ( dd/mm/yyyy or yyyymmdd or others)

  • 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-27T23:46:56+00:00Added an answer on May 27, 2026 at 11:46 pm

    If you perform the insert using parameters, you won’t have to worry about the format of the string.

    However, if that is not an option, you can use:

    myDate.ToString("dd-MMM-yy").ToUpper()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I’m trying to bulk insert data to SQL server express database. When doing bcp
I am trying to insert some text data into a table in SQL Server
I'm trying to insert a data into oracle database(version 11g xe).But when i'm trying
Im trying to insert data with japanese characters to an oracle database. The things
I am trying to bulk insert some data into an oracle db. I followed
I got the following error , when i am trying to insert data into
I'm trying to insert over 100,000 records into an Oracle 9i table with no
I was trying to insert some data into a table and I got the
I've been trying to understand Oracle database's use of data type = number. I
When trying to insert data programatically using PHP, via the function date('c') It returns

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.