Skip to Content.
Sympa Menu

freetds - Re: Sql 7 date

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Bob Kline <bkline AT rksystems.com>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: Sql 7 date
  • Date: Wed, 26 Sep 2001 16:25:46 -0400 (EDT)


On Wed, 26 Sep 2001, mlontsman wrote:

> So then I started thinking of how to hack it and perhaps retrieve
> the date as a string as and then cast it into a date, but none of
> the built in java Date classes seem to recognize a date like:
> '2001-03-03 00:00:00.0' as a valid date.

This code works:

public class tDate {
public static void main(String[] av) {
java.sql.Timestamp ts =
java.sql.Timestamp.valueOf("2001-09-26 16:19:00.423");
System.out.println("and the value is: " + ts.toString());
}
}

--
Bob Kline
mailto:bkline AT rksystems.com
http://www.rksystems.com





Archive powered by MHonArc 2.6.24.

Top of Page