Re: datetime JDBC date conversion
From: John Bell (jbellnewsposts_at_hotmail.com)
Date: 10/26/04
- Previous message: billb: "datetime JDBC date conversion"
- In reply to: billb: "datetime JDBC date conversion"
- Next in thread: Joe Weinstein: "Re: datetime JDBC date conversion"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 26 Oct 2004 21:12:54 +0100
Hi
Are you saying that getTime() returns 00:00:00 ?
Posting your the code that tries to retrive this may help!
John
"billb" <kmilburn@austin.rr.com> wrote in message
news:3561fddb.0410261050.6c8bafba@posting.google.com...
> I am writing a datetime field value to MS SQL Server 7 in the following
manner
> via a stored procedure:
>
> // item to be written is originally a java.util.Date object
> java.util.Date fromDate;
> // I'm inserting it here into the database
> cstmt.setTimestamp(8, new Timestamp(fromDate.getTime()));
>
> // the record in the database appears as follows - as I wanted it to..
> 12/23/2004 4:30:43 AM
>
> The problem is reading the date FROM the database back into ANY type of
Java
> Date-related object. No matter what I try, the hour/minutes/seconds are
not
> returned, and I desperately need the hour and minutes. I don't want to
store
> the hours and minutes in another field - it just causes more
complications.
> Does anyone out there know a way to get the ENTIRE date value out of the
database?
- Previous message: billb: "datetime JDBC date conversion"
- In reply to: billb: "datetime JDBC date conversion"
- Next in thread: Joe Weinstein: "Re: datetime JDBC date conversion"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|