I Make a J2ME Application and I just want to print the system date and time, and when I search I found this class that used for that purpose, but I didn't find it in J2ME to use it.
How can I do that?
I Make a J2ME Application and I just want to print the system date and time, and when I search I found this class that used for that purpose, but I didn't find it in J2ME to use it.
How can I do that?
Is this enough for what you need?
Calendar cal = Calendar.getInstance(); StringBuffer date = new StringBuffer(); StringBuffer time = new StringBuffer(); date.append(cal.get(Calendar.DATE)).append('/'); date.append(cal.get(Calendar.MONTH) +1).append('/'); date.append(cal.get(Calendar.YEAR)); time.append(cal.get(Calendar.HOUR_OF_DAY)).append(':'); time.append(cal.get(Calendar.MINUTE)).append(':'); time.append(cal.get(Calendar.SECOND));