Casting Time DateTime MySQL to C#
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Casting Time DateTime MySQL to C#

  1. #1
    Join Date
    Jul 2012
    Location
    Ohio
    Posts
    13

    Casting Time DateTime MySQL to C#

    I have a MySQL data adapter and I am trying to query a table and place it in a DataSet. The problem I have is SOME of the time and DateTime values are being converted into C# TimeSpan variables rather than DateTime. I tried adding a CAST(timeVariable AS DATETIME) and the problem still exists. I tried to just import the Schema then change the data type in the dataset and this did not work either.
    I am using the MySql.Data.MySqlClient objects to do the fill. Any Thoughts?

  2. #2
    Join Date
    Jan 2010
    Posts
    1,099

    Re: Casting Time DateTime MySQL to C#

    Could you show some code? Where you tried adding a cast? Where TimeSpan appears in the code?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center