Basic Time Using Tutorial

1. The following is the sample code of using time:

Time now = new Time();
	   now.setToNow();
	   int gio = now.hour;
	   int phut = now.minute;
	   int giay = now.second;
	   int ngay = now.monthDay;
	   int thang = now.month;
	   int nam = now.year;
	   String inra = ""+gio+"_"+phut+"_"+giay+"_"+ngay+"_"+thang+"_"+nam;
	   System.out.println(inra);

Happy timing 🙂

Advertisements

One thought on “Basic Time Using Tutorial

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s