Hi JW ,
Many thanks !!
Ken :-)
"Janwillem Borleffs" <jw...jwscripts.com> glsD:4285d5b0$0$6770$dbd41001...news.euron et.nl...
> Nek wrote:
>> I want to add Date and Time to my Java Program , How can i get the
>> system time and date and pass to Java program ?
>>
> 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
~ ?榳?^, R*n?*I ~
~ Samba, more than a low cost File and Printer server ~
-- Let us OpenSource --
nek
| Wed, 26 Dec 2007 22:50:00 GMT |