• Post Reply Bookmark Topic Watch Topic
  • New Topic

java.util.Date  RSS feed

 
Gil Carvalho
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I need some help regarding this subject

I need a variable Date who return me today's date in yyyy-MM-dd

I need another variable Date who retursn Date from today + 7 days

The examples seen doesn't help me

Regards
 
Tim Cooke
Marshal
Posts: 4044
239
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would suggest you use the new java.time package for representing date and time references rather than the old java.util package.

There's a Oracle Tutorial that will show you how to use it in the way you wish.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!