db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan Bobko" <r...@ostrich-emulators.com>
Subject Re: Derby dates
Date Mon, 26 Sep 2005 19:28:36 GMT
I would look into a SimpleDateFormat object. It can handle text-to-date
and date-to-text conversions pretty easily.

ry

> Bernt M. Johnsen wrote:
> 
> >>>>>>>>>>>>>Nicolas Dufour wrote (2005-09-26
08:16:14):
> >>>>>>>>>>>>>                          
> >>>>>>>>>>>>>
> >>Hello
> >>
> >>First of all, I would thank the work behind derby : it's a really good 
> >>product :)
> >>
> >>Now, I have a little problem to use it with datetime.
> >>I have this error :
> >>
> >>SQL Exception: The syntax of the string representation of a datetime 
> >>value is incorrect
> >>ERROR 22007: The syntax of the string representation of a datetime
value 
> >>is incorrect.
> >>
> >>And I think that the values are for example in this format :
> >>01/02/2004 00:00:00
> >>
> >>I have looked at the docs, but I cant find a clear answer about this.
> >>What is the correct datetime syntax ?
> >>    
> >>
> >
> >{ts 'yyyy-mm-dd hh:mm:ss.f...'}
> >
> >Which should work for any conformat JDBC driver
> >  
> >
> so any other format like mm/dd/yyyy hh:mm:ss for example will not be 
> inserted right ???
> or is it a way to avoid this problem ?
> 
> Thanks
> 
> >  
> >
> >>Thank you
> >>
> >>Nicolas Dufour
> >>    
> >>
> >
> >  
> >
> 
> 
> 



Mime
View raw message