Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Urgent Help  RSS feed

 
Jay Shaw
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am trying to write a new class to wrap my Date object which takes millisecs. This class is somewhat similar to the java.sql.Time class which does almost the same thing what I wanted to do. But the problem is I dont want to use java.sql package. So i wanted to create this class which basically should wrap my Date object and set the date to zero epoch and give me just an object with hrs:mins:secs and not full date. I could'nt write this as most of the constructors in Date are deprecated. Is there any way I could set the date object to zero epoch and get what i wanted? Please help. I have a dead line today. I am stuck here. How can I set my date to zero epoch and just return an object of type Time.
Thanks in advance
Jay
 
Ryan Langley
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try using java.util.GregorianCalendar
The java docs even do a good job of showing how to get each particular part of the date and time.

------------------
Cheers,
RL
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!