in

System.Data.SQLite

An open source ADO.NET provider for the SQLite database engine

How to convert excel datetimes using tableadapter?

Last post 01-30-2010 4:32 PM by andy2m. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 01-30-2010 4:32 PM

    • andy2m
    • Not Ranked
    • Joined on 01-30-2010
    • Posts 1

    How to convert excel datetimes using tableadapter?

    Here's my question:

    I have an SQLite table containing Excel datetimes e.g. 40057.0069444444 (old OLE format), stored in SQlite db in Double format.

    Now I want to show them in a TableGridView using a tableadapter.
    This doesn't work because .net can't convert from Double numbers to the .net System.datetime format which is no surpirse.

    Well, there's a method named "FromOADate" which is made to convert from those excel datetimes to .net datetime.

    And now my question: Where do I have to put this method given the fact I want to use the Table Adapter Designer from Visual Studio?
    Or do I have to override any tableadapter method, but which one and how?

    (I'm using VB and Visual Studio 2008)

    Thanks in advance for any help!

    Andy

Page 1 of 1 (1 items)
Powered by Community Server (Commercial Edition), by Telligent Systems