🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #2649

Re: TDateTime

#2649
From: Dennis Jones
Date: Wed, 24 Jan 2007 03:10
21 lines
1334 bytes
"Robert G. Hoover" <not.a.real.address@anywhere.sorry> wrote in message 
news:45b6c4c7@newsgroups.borland.com...
> Is there an easy way to add time to a TDateTime object? I'd like to add an 
> hour
> or a minute, etc.
>
> Thanks,
>
> Rob

Here's a simple method:

  TDateTime dt = Now();
  printf( "\n%s", AnsiString(dt).c_str() );  // ex. print 1/23/2007 7:00:00 
PM
  dt += EncodeTime(1, 0, 0, 0);
  printf( "\n%s", AnsiString(dt).c_str() );  // ex. print 1/23/2007 8:00:00 
PM

- Dennis 
Technical Details
Message-ID: <45b6cdeb@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <45b6c4c7@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,605f02ebdda824c7
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Dennis Jones" <nospam@nospam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <45b6c4c7@newsgroups.borland.com>
Subject: Re: TDateTime
Date: Tue, 23 Jan 2007 19:10:12 -0800
Lines: 23
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 71.245.109.58
Message-ID: <45b6cdeb@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1169608171 71.245.109.58 (23 Jan 2007 19:09:31 -0800)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail