Cool ... This is working.
The only format I did not try (2007-01-01) :)

Thanks
Dev

-----Original Message-----
From: Bryan Pendleton [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 06, 2008 12:29 AM
To: Derby Discussion
Subject: Re: How to insert using hard-coded dates in a table?


> How to insert dates (need to do some testing) into tables?

In literal SQL text, I use the format 'YYYY-MM-DD HH24:MI:SS', as in:

    insert into tran values ('2008-02-01 08:09:10')

> Also when I am populating this field from a form or populating from a 
> Java variable to store it in the Database, how can I control the
format 
> e.g. YYYY-MM-DD or YYYY/DD/MM

In Java code, you will find that the classes Calendar and DateFormat
are the places to look for manipulating java.util.Date and
java.sql.Timestamp
values.

thanks,

bryan
--------------------------------------------------------

This message w/attachments (message) may be privileged, confidential or 
proprietary, and if you are not an intended recipient, please notify the 
sender, do not use or share it and delete it. Unless specifically indicated, 
this message is not an offer to sell or a solicitation of any investment 
products or other financial product or service, an official confirmation of any 
transaction, or an official statement of Merrill Lynch. Subject to applicable 
law, Merrill Lynch may monitor, review and retain e-communications (EC) 
traveling through its networks/systems. The laws of the country of each 
sender/recipient may impact the handling of EC, and EC may be archived, 
supervised and produced in countries other than the country in which you are 
located. This message cannot be guaranteed to be secure or error-free. This 
message is subject to terms available at the following link: 
http://www.ml.com/e-communications_terms/. By messaging with Merrill Lynch you 
consent to the foregoing.
--------------------------------------------------------

Reply via email to