• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Constructing a Date object

 
Varadan Anandanpillai
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How do I construct a java.sql.Date or java.util.Date for a specific data, say, June 25th 1995. How do I come with a value for that date in milliseconds? Is there any java utility that does this.
Thanks,
Varadan.
 
Jason Stortz
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Varadan,
My topic: java.util.Date

This will print the current date. You can also set the time on myDate with myDate.setTime(newMillisSeconds); or get the time in milli seconds from the date object with myDate.getTime(); which will return a long.
Hope that helps some.
Jason
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic