This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Date & Time  RSS feed

 
Mathavan Balakrishnan
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends
I want to know how to get the system date and time.
Can u tell me the method and class used for that ?
Waiting for ur reply.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look at classes like GregorianCalendar and Calendar.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16028
87
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

If you want the output in a specific format, have a look at class java.text.SimpleDateFormat.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!