Recent

Author Topic: field 'Time' in sqlite  (Read 3774 times)

C#R#

  • New Member
  • *
  • Posts: 45
field 'Time' in sqlite
« 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  .....

http://www.lazarus.freepascal.org/index.php?name=PNphpBB2&file=viewtopic&t=2922&highlight=date
http://www.lazarus.freepascal.org/index.php?name=PNphpBB2&file=viewtopic&t=3183&highlight=

well...
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 ???  

thanks.....

matthijs

  • Hero Member
  • *****
  • Posts: 537
Re: field 'Time' in sqlite
« Reply #1 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. :) )
What's in a sig? Would my posting look less if it didnot have a sig? (Free after William S.) :)

:( Why cannot I upload my own Avatar? :(

C#R#

  • New Member
  • *
  • Posts: 45
RE: Re: field
« Reply #2 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);

Thanks.

 

TinyPortal © 2005-2018