Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 3 of 3 total |
Timestamps and milliseconds |
Wed, Jul 4 2007 9:25 PM | Permanent Link |
"Jeff Cook" | Hi I've pored through the postings on the website newsgroups and still can't work out how to set a timestamp field. My code currently says:- apmDM.LogTable.Insert; apmDM.LogTableLoggedAt.AsDateTime := Now; But the Delphi 6 Help says (see below) that it will lose the milliseconds. How do I avoid this? DBISAM 3.30. Cheers Jeff ========= help as below =============== Now function Returns the current date and time. Unit SysUtils Category date/time routines function Now: TDateTime; Description Returns the current date and time, corresponding to Date + Time. Note: Although TDateTime values can represent milliseconds, Now only returns the time to the closest second. -- Jeff Cook Aspect Systems Ltd www.aspect.co.nz + Joan and Jeff Cook The Cooks Oasis www.cookislandsoasis.com |
Wed, Jul 4 2007 10:33 PM | Permanent Link |
"Robert" | "Jeff Cook" <jeffc@aspect.co.nz> wrote in message news:765A0D11-D081-4CE3-8075-69AF89051789@news.elevatesoft.com... > > > Note: Although TDateTime values can represent milliseconds, Now only > returns the time to the closest second. > A documentation error, apparently. The following seems to work correctly. var s : string; begin DateTimeToString(s, 'yy mm dd hh mm ss zzzz', now); showmessage(s); Robert |
Thu, Jul 5 2007 3:55 PM | Permanent Link |
"Jeff Cook" | Robert wrote:
> DateTimeToString(s, 'yy mm dd hh mm ss zzzz', now); > showmessage(s); There you go. I'm always getting in trouble for not reading the Help and then when I finally do ... the Help is wrong Grrrrrrrrr.... Thanks Robert Cheers Jeff -- Jeff Cook Aspect Systems Ltd www.aspect.co.nz + Joan and Jeff Cook The Cooks Oasis www.cookislandsoasis.com |
This web page was last updated on Sunday, May 19, 2024 at 08:46 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |