Hi,

Try using JDBC escape sequences :
(don't remember exact syntax, chk Java docs)

{ d '<date_fmt_string' }

in your SQL stmt.

d is for date, t is for time, ts is for timestamp (= date+time).

That plus some of the Java date API's should solve your problem.

HTH

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Vasudev Ram
Infosys Technologies Limited
Pune, India
Email : [EMAIL PROTECTED]
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

> -----Original Message-----
> From: John McDonald [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, December 23, 1999 9:42 PM
> To:   [EMAIL PROTECTED]
> Subject:      Date formatting for MSSQL
>
> Would anyone be kind enough to point me in the right direction for a peice
> if code that will format dates, retrieved from an MSSQL database, into
> something readable. The problem here is that MSSQL only stores dates in
> (yy/mm/dd hh:mm:ss) format. I need to format that into mm/dd/yy and I
> search by this formatted date. I am in the midst of a project where I must
> use the MSSQL datetime type.
>
> Anyone have any suggestions.
>
> John D. McDonald
> CipherStream Systems
> Phone: 925.373.8700
> Fax:     413.793.6603
> email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> web: www.cipherstream.com <http://www.cipherstream.com>
> -------------------------------------------------------
> Secure E-Business Is Our Business
> -------------------------------------------------------

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to