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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:00:29+00:00 2026-05-18T01:00:29+00:00

0000-00-00 00:00:00 i have this date in mysql as default date in undefined case

  • 0
0000-00-00 00:00:00

i have this date in mysql as default date in undefined case

how i can get them in c# and re insert them without changes in MysqlDatabase.

if i get them in c#. i got error that Unable to convert MySQL date/time value to System.DateTime

how i can get this in c# and insert them without any changes in date

  • 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-18T01:00:30+00:00Added an answer on May 18, 2026 at 1:00 am

    Use Nullable types and the as operator to represent your datetime values in C#. This is the easiest mechanism to deal with database types which map to value types and potentially have no value. For example:

    object valueFromMySQL = GetValueFromMySQL(); // or whatever
    DateTime? datetimeValue = valueFromMySQL as DateTime?;
    

    If the value is valid, it will be interpreted as DateTime, otherwise it will be interpreted as null.

    You should also be able to send values of the type DateTime? back to MySQL without issue.

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

Sidebar

Related Questions

I have a field of type date in MySQL. When I try to insert
I have a little problem birthday´s get stored as DATE in the MySQL database.
I have a third party web service that returns this xml <book> <release_date>0000-00-00</release_date> </book>
I have two arrays with time values in them in this format. 00:00:00 which
MySQL allows the value of 0000-00-00 for date fields, however ActiveRecord treats an assignment
I am trying to insert date and time into mysql datetime field. When a
Right now my dates look like this: `2011-01-01 5:45:23 +0000 I want them to
I have an INSERT statement that looks like this: INSERT INTO officer (officer_number, name,
I have a date field in php which is using this code: $date =
date('H-m-s') gives something like this when I echo variable > 08-07-16 I have table

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.