by Troll <troll@[EMAIL PROTECTED]
>
Jul 16, 2008 at 03:55 PM
Maarten Wiltink wrote:
> "TD" <dlee@[EMAIL PROTECTED]
> wrote in message
>
news:d9b4b7d8-4aa9-4af6-b9c4-5b74847783b5@[EMAIL PROTECTED]
>
>> I have created an SQLite database in which two of the fields are of
>> type "Time". In the database this field type in stored as "hh:mm AM/
>> PM". In my Delphi project I have a TDBGrid on a form and the grid
>> displays the two time fields Whenever I run the program I get the
>> error ""PM" is no a valid time". How do I fix this?
>
> Don't use time strings in the database. Differentiate between storage
> and presentation. For storage, you're much better off with time as a
> number of seconds since 1970 or something similar. That humans can't
> easily decode that doesn't matter, you don't show that to them.
>
> Groetjes,
> Maarten Wiltink
>
>
If you look into this a little bit, you'll see that it
really works quite well and you'll write a function to
interpret both ways for human and db readable forms.
Then all of the sudden, you'll have a whole library of
date/time to str and back functions that will make your
life a whole lot easier.