in

System.Data.SQLite

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

_datetimeFormats not fully correct cause data access failure

Last post 01-06-2009 7:59 PM by unruledboy. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 01-05-2009 10:58 PM

    _datetimeFormats not fully correct cause data access failure

    because the short date format in our system's globalization settings is yyyy-M-d, so for most of the dates in a year like months of 1-9, days of 1-9 will cause the provider not correctly handle datetime.

     please add the following to _datetimeFormats, thanks a lot: 

          "yyyy-M-d",
          "yyyy-M-d HH:mm:ss",
          "yyyy-M-d HH:mm:ss.FFFFFFF",

     what's more, since the date time format setting may varies on different computer, if you are not going to read the setting, for example, some system will use "/" as the separator, not "-", I recommend that you could provide a method for the user(developer) to configure the format, for example, adding "DateTimeFormat=yyyy-M-d" in the connection string will be appreciated :)

    btw, missing SQLite-1.0.60.0-source\System.Data.SQLite.Linq\SQL Generation\SqlChecker.cs, could not compile.

  • 01-06-2009 8:39 AM In reply to

    Re: _datetimeFormats not fully correct cause data access failure

    please fix the bug and publish it ASAP, thanks a lot
  • 01-06-2009 10:56 AM In reply to

    Re: _datetimeFormats not fully correct cause data access failure

    I'm sorry but I will not be adding those formats to the core SQLite .NET library distribution.  The only officially supported formats are ISO8601 formats.  Those datetime formats are custom non-ISO formats.

    I highly recommend you update your code to use internationalized ISO8601 formats when inserting datetimes into your database.

     

  • 01-06-2009 7:16 PM In reply to

    Re: _datetimeFormats not fully correct cause data access failure

    that's too bad to hear that, in Simplified Chinese version of windows 2000 and 2003, the date time format is yyyy-M-d by default, and for vista, it is yyyy/M/d, which means your provider will not correctly run in all of the above systems.

  • 01-06-2009 7:46 PM In reply to

    Re: _datetimeFormats not fully correct cause data access failure

    Why should the SQLite provider use regional datetime formatting?  The whole purpose of the database is to be internationalized.  It should be completely independent of regional settings.

    If you want to have your database run on any version of Windows for any region, then you should format your dates and times using a standardized fixed format.  That's what ISO8601 is supposed to accomplish.

     

  • 01-06-2009 7:59 PM In reply to

    Re: _datetimeFormats not fully correct cause data access failure

    ok, I got your point, I have made a function to convert the date.

    really thanks for your nice provider

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