[yunqa.de] Re: License and work

  • From: Delphi Inspiration <delphi@xxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Tue, 09 Sep 2008 10:13:17 +0200

Joan Dorrepaal wrote:

>I run the following code in SQLiteSpy:
>create table sum_example (
>                                 dt date,
>                                 xy number
>                                );
>        insert into sum_example values (to_date('27.08.1970','DD.MM.YYYY'),4);
>        insert into sum_example values (to_date('02.09.1970','DD.MM.YYYY'),1);
>        insert into sum_example values (to_date('09.09.1970','DD.MM.YYYY'),5);
>It gives me an error: SQLite Error 1 - is no such function: to_date
>How can I get this to work? 

You can not get this to work with SQLiteSpy. The quoted page uses "wrong" 
SQLite SQL syntax: The "to_date" SQL function is not part of the SQLite core. 
It is therefore not supported by SQLiteSpy.

The following page gives an overview of SQL date and time functions supported 
by SQLite and SQLiteSpy:


If you are using the DISQLite3 library for Delphi you can of course define your 
own implementation of the "to_date" function using the 
sqlite3_create_function() interface which would then be available to your 
custom built applications.


Delphi Inspiration mailing list

Other related posts: