Programming => Databases => Topic started by: C#R# on January 27, 2007, 03:07:16 am

Title: field 'Time' in sqlite
Post by: C#R# on January 27, 2007, 03:07:16 am
Hello for All !

At a time ago I had to install laz9.16 over the laz9.20 because the Date field in FIB dataset returns 00/00/000  .....

At this time, I work arround with laz9.20 and sqlite3.... and the
Code: [Select]
PaintBox1.Canvas.TextOut(coluna - 30,10,TimeToStr(SqliteEvetosG.FieldByName('Hora').AsDateTime));

returns 00:00 ......  

But the
Code: [Select]
PaintBox1.Canvas.TextOut(coluna - 30,10,DateToStr(SqliteEvetosG.FieldByName('Data').AsDateTime));
work´s good !!!

anybody know what is this ???  

Title: Re: field 'Time' in sqlite
Post by: matthijs on January 27, 2007, 12:17:37 pm
Quote from: "C#R#"

anybody know what is this ???  

A bug? :)
Create a sample project. Call both functions for the same field. And report it as bug in bug tracker. (Of course check first if it has not been reported already. :) )
Title: RE: Re: field
Post by: C#R# on January 28, 2007, 01:51:40 am
Hi Matthijs,
Simply change to varchar is a good solution at this time ...(I don´t have any data to save ... uuufffff!!!!)
Code: [Select]

form1.SqliteEventos.QuickQuery('insert into Eventos values (' + QuotedStr(DateToStr(Now)) + ')' );

It is easy to retrieve too...
Code: [Select]
PaintBox1.Canvas.TextOut(coluna - 30,5,SqliteEventos.FieldByName('Hora').AsString);

TinyPortal © 2005-2018