• Post Reply Bookmark Topic Watch Topic
  • New Topic

Date Query  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to create a new date(java.util.Date) with a previous date(Ex :Jan 01 2007), how to create the Date object with a past date.

Thanks..
 
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch !!

Can you elaborate your problem , Do you want to say , you have an Date object with some old date and you want to make it as toady's date object ??

If yes, then Look out the Calendar class, Calender# getTime(), will helps !!
 
Marshal
Posts: 56600
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please don't ask the same question twice.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!