db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Pendleton <bpendle...@amberpoint.com>
Subject Re: How to insert using hard-coded dates in a table?
Date Mon, 05 May 2008 18:59:08 GMT
> 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


Mime
View raw message