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

The Archive Base Latest Questions

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

Request Execute is failed if one of fields to be mapped has DateTime field

  • 0

Request Execute is failed if one of fields to be mapped has DateTime field and corresponding value in DB has ‘0000-00-00’ or ‘0001-01-01’. The following error is returned

Unable to convert MySQL date/time value to System.DateTime

Is there any possibility to fetch such value?

I’ve tried to specify the ‘DateTime?’ value as property type – it doesn’t help too (actually, I didn’t expect that to be helpful).

P.S. I use MySql 5.1

  • 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-22T22:46:56+00:00Added an answer on May 22, 2026 at 10:46 pm

    I came across a similar problem using NHibernate with the same error in an exception.

    It’s due to MySQL’s unique “feature” of allowing invalid dates in a DATE field, especially using 0000-00-00 as a default value for DATE NOT NULL columns. When such a date is encountered, it throws an exception when converting itself to a DateTime.

    The suggested solution for this was to add

    Allow Zero Datetime=True;

    to the connection string, however in practice this did not work for me. I eventually solved the problem by altering the connection string adding

    Convert Zero DateTime=true;

    so your app.config section would look something like this

      <connectionStrings>
    <add
      name="ConnectionString.MySql"
      connectionString="Server=localhost;Port=3306;Database=BLT;Uid=someuser;Convert Zero DateTime=true;"
      providerName="MySql.Data.MySqlClient"/>
    

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

Sidebar

Related Questions

i am getting this error failed to execute request because the app-domain could not
I created the following interface: <?php interface Action { public function execute(\requests\Request $request, array
Gemfile gem wicked_pdf gem wkhtmltopdf-binary the error: RuntimeError in CarsController#show Failed to execute: /usr/bin/wkhtmltopdf
I need to execute a http web request from Plesk's Task Scheduler (using shared
another request sorry.. Right now I am reading the tokens in one by one
The request is a simple one, but is hard to google for. Here are
load failed -- arguments: [Object api=Object, Object request=Object reader=Object scope=Object, Object tId=0 status=200 statusText=OK,
Anybody can help me? When calling HttpResponse response = client.execute(request); It throws an IOException
Request[key] vs Request.Params[key] vs Request.QueryString[key] Which method do you seasoned programmers use? and why?
This request is based in MS Access VBA. I would like to know what

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.