Article View: borland.public.interbase.sql
Article #11269Re: Converting DATE. TIME, and TIMESTAMP values for SQL
From: Edward Diener
Date: Mon, 02 Dec 2002 04:09
Date: Mon, 02 Dec 2002 04:09
28 lines
2302 bytes
2302 bytes
"Wayne Niddery [TeamB]" <wniddery@chaff.aci.on.ca> wrote in message news:3deaa602$1@newsgroups.borland.com... > "Edward Diener" <eddielee@tropicsoft.com> wrote in message > news:3dea6388$1@newsgroups.borland.com... > > How does one convert: > > > > 1) A 32-bit integer date value to an acceptable SQL value for a DATE > column, > > or does a 32-bit numeric value suffice ? > > 2) A 32-bit integer time value to an acceptable SQL value for a TIME > column, > > or does a 32-bit numeric value suffice ? > > 3) A 64-bit large integer value to an acceptable SQL value for a TIMESTAMP > > column, or does the 64 bit numeric value suffice ? > > It is impossible to answer this without knowing what the base and format of > these 32 / 64 bit values are. Is the 32 bit date a number of days? If so > what date does a value of 0 equal? Is the Time value a number of seconds, > milliseconds, ...? This is all explained in the Data Definition Guide under the topic "DATE, TIME, and TIMESTAMP datatypes". But I do see a slight mention of conversion routines which go from the internal type to a C struct and then I recall in the Embedded SQL guide some info about converting from the C struct to acceptable SQL formats. I will work my way through all of that and come up with a solution. Thanks !
Technical Details
Message-ID:
<3deadc30$2@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-04!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3dea6388$1@newsgroups.borland.com> <3deaa602$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 114a0e,c9629bca0d33469f X-Google-Attributes: gid114a0e,public X-Google-ArrivalTime: 2002-12-01 20:08:56 PST From: "Edward Diener" <eddielee@tropicsoft.com> Newsgroups: borland.public.interbase.sql References: <3dea6388$1@newsgroups.borland.com> <3deaa602$1@newsgroups.borland.com> Subject: Re: Converting DATE. TIME, and TIMESTAMP values for SQL Date: Sun, 1 Dec 2002 23:09:01 -0500 Lines: 30 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 216.175.67.251 Message-ID: <3deadc30$2@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1038801968 216.175.67.251 (1 Dec 2002 20:06:08 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-04!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail