Article View: borland.public.cppbuilder.database.ado
Article #1377Re: TimeStamp (Again)
From: Mark Guerrieri
Date: Wed, 28 Jul 2004 18:23
Date: Wed, 28 Jul 2004 18:23
35 lines
1837 bytes
1837 bytes
TADOQuery* qry = new TADOQuery(NULL);
try
{
qry->SQL->Text = "select TimeStampField from MyTable where [some
condition]...";
qry->ConnectionString = "Whatever the connection string should be";
qry->Open();
if(!qry->Eof)
Edit1->Text =
qry->FieldByName("TimeStampField")->AsDateTime.DateTimeString();
}
__finally
{
delete qry
}
Mark
"kev" <kev@isp.com> wrote in message
news:4107cdfb$1@newsgroups.borland.com...
> Anyone want to take a stab at this one? I posted last week, but no replys
> yet.
> --------------
> Could someone please tell me how to simply get the value from a TimeStamp
> field in a SQL Database and paste it as a Date / Time string in an Edit
box?
> It seems like it should be so simple, yet I cannot seem to stumble onto
the
> correct code.
> --------------
>
> thanks,
> Kev
>
>
Technical Details
Message-ID:
<4107ef0f$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<4107cdfb$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,66acc601531f49bc X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Mark Guerrieri" <mguerrieri@cmsgrp.com> From: "Mark Guerrieri" <mguerrieri@cmsgrp.com> Newsgroups: borland.public.cppbuilder.database.ado References: <4107cdfb$1@newsgroups.borland.com> Subject: Re: TimeStamp (Again) Date: Wed, 28 Jul 2004 14:23:12 -0400 Lines: 37 Organization: Creative Marketing Strategies X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 66.200.143.50 Message-ID: <4107ef0f$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1091038991 66.200.143.50 (28 Jul 2004 11:23:11 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail