> For something crude, you could do :
> lblTime.setText("" + new Date() );
> but for nice formatting, have a look at this :
> http://javalessons.com/cgi-bin/fun/java-tutorials-main.cgi?sub=gui&ses=ao789
> Lesson g47. Date and time
You want to use the Class SimpleDateFormat.
SimpleDateFormat myFormat =
new SimpleDateFormat("E, dd MMM yyyy HH:mm:ss Z");
lblTime.setText(myFormat.format(new Date()));
You just need to look at the Date Time format you want to actually use.
You only have to create one SimpleDateFormat field and then just reuse
that as the second line of code does above. You can find that on the
Class SimpleDateFormat API page at:
http://java.sun.com/j2se/1.5.0/docs/api/java/text/SimpleDateFormat.html

Signature
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Thanks very much for your help I have done it and it works fine. Thanks
very much once again.
> For something crude, you could do :
> lblTime.setText("" + new Date() );
> but for nice formatting, have a look at this :
> http://javalessons.com/cgi-bin/fun/java-tutorials-main.cgi?sub=gui&ses=ao789
> Lesson g47. Date and time