• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Urgent Help

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic