🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Getting a Time Stamp in Builder 5

#4526
From: Antonio Felix
Date: Sun, 22 Jan 2006 17:53
32 lines
1830 bytes
Antonio Felix escreveu:
> Thomas escreveu:
>> I've google and didn't really get my answere. I have MySql set up to 
>> do backups and its nameing format is as follows:
>>     DataBaseBackUp 20060123 2300.sql
>> Thats Name Date and Time. Is there a function in Builder that I can't 
>> find that will give me the date in that format. I know
>> there is I'm just missing it. Need the Year-Month-Day. Just a little 
>> brain dead on this one today.
>>     thanks.
>>
> Hi Thomas
> 
> If you have a TDateTime var you can use
> 
> MyDate.FormatString("yyyymmdd' 'hhnn")
> 
> to get that TDateTime in the desired format
> 
> Is that what you want?
> 
> HTH
> Antonio

If you need the current DateTime Stamp then use


AnsiString MyDTSString;
MyDTSString = Now().FormatString("yyyymmdd' 'hhnn");

BR
Antonio
Technical Details
Message-ID: <43d3c5f3@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news4.google.com!newshub.sdsu.edu!pln-w!lotsanews.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <43d3ada2$1@newsgroups.borland.com> <43d3c546$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,ca567ebc1089d7fe
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Sun, 22 Jan 2006 17:53:47 +0000
From: Antonio Felix <NoMail@Unknow.pt>
User-Agent: Thunderbird 1.5 (Windows/20051201)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Getting a Time Stamp in Builder 5
References: <43d3ada2$1@newsgroups.borland.com> <43d3c546$1@newsgroups.borland.com>
In-Reply-To: <43d3c546$1@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 87.196.76.12
Message-ID: <43d3c5f3@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1137952243 87.196.76.12 (22 Jan 2006 09:50:43 -0700)
Lines: 33
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news4.google.com!newshub.sdsu.edu!pln-w!lotsanews.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail