🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: how to convert a datetime stamp to TDateTime

#14598
From: Remy Lebeau (TeamB)
Date: Fri, 08 Aug 2003 16:34
17 lines
1606 bytes
"Siney San" <siney@yeah.net> wrote in message
news:3f33b794@newsgroups.borland.com...

> In IMAGE_FILE_HEADER structure, there is
> a TimeDataStamp member variant(DWORD),
> how to convert it to TDateTime??

The TimeDataStamp is just a DWORD representation of the value returned by
the time() C function.  You can cast the TimeDataStamp to a time_t and use
it like any other time_t value.  For example, pass it to the localtime()
function to get a tm structure containing the individual portions of the
date/time (month, day, etc), and then pass those values to TDateTime's
constructor directly or use the EncodeDate() and EncodeTime() VCL functions.


Gambit
Technical Details
Message-ID: <3f33cf89$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3f33b794@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,ac5ec87b9e405ff5
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-08-08 09:32:55 PST
From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3f33b794@newsgroups.borland.com>
Subject: Re: how to convert a datetime stamp to TDateTime
Date: Fri, 8 Aug 2003 09:34:17 -0700
Lines: 19
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.1106
NNTP-Posting-Host: 207.175.226.26
Message-ID: <3f33cf89$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1060360073 207.175.226.26 (8 Aug 2003 09:27:53 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail