| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| On Thu, 16 Sep 2004 12:16:54 -0700, Robert Bowen wrote: > I have been searching the lists for this ... I've come up with lots of > info but I can't quite get this to work. I thought it would be simple but > then, things just never are. > > I have a postgresql 7.5 database in Win2000, and it now accepts european > date format (dd/mm/yyyy). I had to change the "date_format" in the > postgresql.conf. > The default date format for postgresql, it seems is "yyyy-mm-dd" > > But I can't get the commons BeanUtils to swallow a date in european > format. It will only accept "yyyy-mm-dd", just like postgresql used to. > This strikes me as odd. I know I have to use ConvertUtils to ... register > a new date type but I can't figure out how. > > Can someone give me a brief "how to" or a link to one? > > Many thanks! > syg Use the to_date(string, format) or to_timestamp(string format) in your query to convert your date string by specifying a date format string that matches it, eg to_date('31/10/2004','DD/MM/YYYY'). Chuck |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.