----- Original Message -----
From: "Henner Kollmann" <[EMAIL PROTECTED]>
Date: Tue, 17 Jun 2003 09:55:16 +0200
To: "''Salient Larkin''" <[EMAIL PROTECTED]>
Subject: AW: [dbforms] Date as a part of a key
> Hi Salient,
> >
> > When the date format in dbforms-config.xml is yyyy-MM-dd,
> > there is no problem to update the number table. MySQL log file is:
> >
> > But if I change date format in dbforms-config.xml is
> > dd.MM.yyyy, table won't update because firstDate in WHERE
> > clause is null. MySQL log file is:
> This is correct, date format decribes the format wich your database
> expected!
>
> >
> > When the date format in dbforms-config.xml is yyyy-MM-dd and
> > I use SimpleDateFormat class in jsp, I get a new problem.
> > FirstDate in WHERE clause is correct, but date values get
> > converted from 01.01.1980 to 2001-06-17 and from 01.01.2100
> > to 2001-06-17 in SET clause
> >
> Seems to be a bug, dbforms should format and reinterpret the date
> correct.
> Could you debug the SQLUtils class? There are the converting routines..
>
> Regards,
> Henner
>
Hi,
I debugged the SQLUtils and it seem to be that in the line
SimpleDateFormat sdf = DbFormsConfig.getDateFormatter();
sdf gets/remains value 'yyyy-MM-dd' even i used this line in jsp:
<% SimpleDateFormat sdf = new SimpleDateFormat("dd.MM.yyyy"); %>
<td><db:dateField format="<%= sdf %>" size="10" fieldName="firstDate"/></td>
<td><db:dateField format="<%= sdf %>" size="10" fieldName="lastDate"/></td>
Well, I didn't yet do more debugging. Any ideas?
Regards,
Salient
--
__________________________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup
CareerBuilder.com has over 400,000 jobs. Be smarter about your job search
http://corp.mail.com/careers
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
DbForms Mailing List
http://www.wap-force.net/dbforms