Home » Category » Java Programming

Java Programming: Add Date and Time Class

200| Wed, 30 Apr 2008 21:46:00 GMT| nek| Comments (0)
Hi JW ,

Many thanks !!

Ken :-)

"Janwillem Borleffs" glsD:4285d5b0$0$6770$dbd41001...
news.eurone
t.nl...
> Nek wrote:
> import java.text.SimpleDateFormat;
> import java.util.Date;
> ...
> SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
> System.out.println(sdf.format(new Date()));
> *Or* when you are only interested in the system date and time in ms:
> long sysTimeMs = System.currentTimeMillis();
>
> JW
>
>~ Samba, more than a low cost File and Printer server ~

-- Let us OpenSource --

Keywords & Tags: add, date, time, class, java, programming

URL: http://java.itags.org/java-programming/332360/
 
«« Prev - Next »» 0 helpful answers below.

Java Programming Hot Answers

Java Programming New questions

Java Programming Related Categories