🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #17321

Date/Time operations and JBCL

#17321
From: Papadomichelakis John
Date: Sun, 29 Nov 1998 00:00
58 lines
2285 bytes
This is a multi-part message in MIME format.
--------------99D7DF34ECECDF647C7DCCDC
Content-Type: text/plain; charset=iso-8859-7
Content-Transfer-Encoding: 7bit

I have the following lines of code:
System.out.println(calndFrom.getTime());
System.out.println((new java.sql.Date(98, 9, 11)).getTime());

calndFrom is a java.sql.Date variable that is created using the
QueryDataSet.getDate() method.
The field that calndFrom get's it's value is not coming from the
database but from a JBCL control.

So.. when I enter 10/11/1998 the calndFrom.getTime() returns
907974000000
However when I create a date variable manually I get 908053200000.

So... why this difference?

How can I safely get the difference of tow dates, one that comes from a
jbcl control and an other when the same date has different number of
milliseconds?

Is this a JBCL bug?

--

Papadomichelakis John
"Unite for Java! - http://www.javalobby.org"
__________________________________________________
email : michelos@freemail.gr
TEL   : 30 31 758 429,       30 31 709 796
__________________________________________________


--------------99D7DF34ECECDF647C7DCCDC
Content-Type: text/x-vcard; charset=iso-8859-7;
 name="michelos.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Papadomichelakis John
Content-Disposition: attachment;
 filename="michelos.vcf"

begin:vcard 
n:Papadomichelakis;John
x-mozilla-html:TRUE
org:BIA
adr:;;;Thessaloniki;;56224;Hellas
version:2.1
email;internet:michelos@freemail.gr
x-mozilla-cpt:;0
tel;home:758 429
tel;work:267 923
fn:John Papadomichelakis
end:vcard

--------------99D7DF34ECECDF647C7DCCDC--
Technical Details
Message-ID: <366075EE.841FCFB0@freemail.gr>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5619,532fc107d0b4d430,start
X-Google-Attributes: gidf5619,public
X-Google-Thread: f74b3,532fc107d0b4d430,start
X-Google-Attributes: gidf74b3,public
From: Papadomichelakis John <michelos@freemail.gr>
Subject: Date/Time operations and JBCL
Date: 1998/11/29
Message-ID: <366075EE.841FCFB0@freemail.gr>
X-Deja-AN: 416607234
X-Accept-Language: el
Content-Type: multipart/mixed; boundary="------------99D7DF34ECECDF647C7DCCDC"
Organization: BIA
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language,borland.public.jbuilder.jbcl