--ADVERTISEMENT--

In this example, I will show how to get (display) current date in android application programmatically. To get current date(today's date) in android application, we use Calendar class Calendar calendar = Calendar.getInstance();.

Related:
Get Current Time in Android Programmatically
How to Make a Phone Call in Android
Android Material Design with Design Support Library

Android Example: How to Get (display) Current Date in Android Programmatically


XML Layout File
res/layout/activity_main.xml

Java Activity File
src/MainActivity.java

Now, run your application and click the Get Current Date button to get today’s date.

Output:

Get Current Date in Android Programmatically
Current Date in Android 

Post a Comment

Powered by Blogger.