i have app that needs to get date and time for now moment, anyone can help thank you
Calendar c = Calendar.getInstance();
maybe from Calender object?
i have app that needs to get date and time for now moment, anyone can help thank you
Calendar c = Calendar.getInstance();
maybe from Calender object?
I think a simple search on any search engine could have helped you. Eg:
String date = c.get(Calendar.YEAR) + "-"+ c.get(Calendar.MONTH)+ "-"+ c.get(Calendar.DAY_OF_MONTH) ;
String time = c.get(Calendar.HOUR_OF_DAY) + ":" + c.get(Calendar.MINUTE)+ ":" + c.get(Calendar.SECOND);