I would certainly not use timestamps. A timestamp is certainly useful
when you want to record current time (like a snapshot), but not past
dates. And even then be aware of timestamps... And anyway, since
timestamp also contains time data, it is not being efficient (at least
by that standard). Cetainly, you could create some classes to
artificially handle timestamps and support other dates, but why
bother? Sound very improductive and problematic than what you can get
out of it...

Other than that, how you store the date is your call. I usually prefer
handling dates as numeric values, and using a YYYYMMDD format, so they
can easily be sorted. But that's just me. If you rely on any tools for
persistence, use what will suit them. If you depend on the database
for date operations, use whatever date format the db provides
natively. In any case, it depends more in which one will prove to be
more comfortable for you in the long run.

BTW, on the client side, I highly recommend you to try this calendar
picker script (javascript)
http://dynarch.com:1979/mishoo/calendar.epl

Jorge


On Sat, 26 Jun 2004 19:24:23 +0800, Eddie Yan <[EMAIL PROTECTED]> wrote:
 
> Anyone know what is the best practices to store a person
> date of birth ? How should we design our detail object, JSP and database
> in such way we don't have a messy approached to populate the day,
> month and year in Action class to be able to display in JSP during UPDATE
> process.
> 
> Currently, I have a JSP with combo box for day, month and year.
> Using mySQL db, I set the dateOfBirth column to TIMESTAMP.
> (Some told me to use DATE for this column).
> 
> Obviously TIMESTAMP have the limitation since date of birth before
> Jan 1 1970 will be stored as 00000000000. Know any workaround
> to this one ?
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to