Title: RE : [dbforms] dateField

First off, is their a reason why you are storing dates in an integer type in your database?

Time in java is stored as:

        "milliseconds since January 1, 1970, 00:00:00 GMT."

Have you check the value that is (stored) return from you database....



Philip Grunikiewicz
Hydro-Qu�bec / Montr�al / Canada


-----Message d'origine-----
De : Azria Gilles [mailto:[EMAIL PROTECTED]]
Envoy� : jeudi 16 mai 2002 05:00
� : '[EMAIL PROTECTED]'
Objet : [dbforms] dateField


I always have my big problem with db:datefield and no way :

I have an integer field in my database with a date in format yyyyMMdd...
I've done what was suggested  :
DateField is very easy, just use <db:dateField fieldName="MYDATE"/>, and add to your dbforms-config a string similar to this: <date-format>dd-MMM-yy</date-format> In your case, I think you need to add: <date-format>yyyyMMdd</date-format>.

Done! Of course, if you enter a date, you need to enter it as 20001222 as well. If you are just doing a display then create a simpledateformat object and pass that in as the format attribute. When I use db:textField I can see the field value but

when I use db:dateField the same date appears everywhere 19700101.... Strange behavior ! What's wrong ?? Thanks

Gilles Azria


**********************************************************************
 This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager.

**********************************************************************


_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: [EMAIL PROTECTED] _______________________________________________

DbForms Mailing List

http://www.wap-force.net/dbforms

Reply via email to