You might try something like this:

new java.sql.Timestamp(new Date().getTime())

It needs a milliseconds time value.

Gary

> -----Original Message-----
> From: Scott Wallace [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, March 16, 1999 7:18 AM
> To:   [EMAIL PROTECTED]
> Subject:      Dates from HTML to JDBC
>
> I am having trouble understanding how to capture a date in HTML
> and executing a query with it.
>
> I get the parameter and then run it through the date format parse
> method (roughly):
>
> java.util.date aDate = aDateFormat.parse(textToParse);
>
> This returns a java.util.date.  What I need is a
> java.sql.timestamp.  Does anyone know what the common
> way to get from one to the other is?
>
> Thanks in advance.
>
> Scott
>
> __________________________________________________________________________
> _
> 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

___________________________________________________________________________
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