Your experience on this site will be improved by allowing cookies
How do I display the current Date format?
If you don’t need the date to update automatically, you can insert the current date as text. On the Insert tab, in the Text group, click Date & Time. In the Date and time dialog box, select the format you want and click OK. The date is inserted as text.
Calendar c = Calendar.getInstance(); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String strDate = sdf.format(c.getTime()); Log.d("Date","DATE : " + strDate) |
Android java get current
import java.time.*; LocalDate date = LocalDate.now(); |
import java.time.*; LocalDateTime datetime = LocalDateTime.now(); |
0 comments