See java.text.DateFormat.parse()
gets you a java.util.Date which you can call getTime() on.

Good Luck!
        --m


-----Original Message-----
From: Simon Kelly [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 8:28 AM
To: Struts Users Mailing List
Subject: [OT - a bit] Changing a date from dd.mm.yyyy hh:mm:ss to number
of milliseconds since 1970


Hi,

Does anyone know of a way of doing this convertion in Java or in struts for
that matter?  My db needs the milliseconds, rounded to seconds and I'm
asking the user for a date in the normal format.  As a *major* not, I can't
do the convertion client side as I have to keep the output to them as dumb
as possible (ie pure html only, *NO* JavaScripts or the like :-( )

Any pointers would be appreciated.

Cheers

Simon

Institut fuer
Prozessdatenverarbeitung
und Elektronik,
Forschungszentrum Karlsruhe GmbH,
Postfach 3640,
D-76021 Karlsruhe,
Germany.

Tel: (+49)/7247 82-4042
E-mail : [EMAIL PROTECTED]


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


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

Reply via email to