Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Borland Delphi > Re: "PM" is not...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 3 Topic 3838 of 3952
Post > Topic >>

Re: "PM" is not a valid time error

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.
 




 3 Posts in Topic:
"PM" is not a valid time error
TD <dlee@[EMAIL PROTEC  2008-07-15 20:46:38 
Re: "PM" is not a valid time error
"Maarten Wiltink&quo  2008-07-16 10:09:13 
Re: "PM" is not a valid time error
Troll <troll@[EMAIL PR  2008-07-16 15:55:04 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 13 20:18:43 CDT 2008.