Results 1 to 2 of 2
Thread: Coercing DataTypes
- 07-09-2008, 04:56 PM #1
Member
- Join Date
- Jul 2008
- Posts
- 1
- Rep Power
- 0
- 07-09-2008, 05:59 PM #2
A way to find which class to use is to look at the API doc for the constructors and see how to get from a long to a Calendar. There might be a class that will span that gap.
Something like:
Calendar cal = new Calendar(new ?????(long));
where ???? is the spanning class.
Since Calendar is abstract, you'll need to use a subclass.
Or perhaps there is a method in the class/subclass that takes an object that uses a long in its constructor:
Calendar cal = new Calendar().setTheDate(new ????(long));
You find these by looking thru the possible methods and classes and see how to get from long to Calendar.
Good luck.Last edited by Norm; 07-09-2008 at 06:05 PM.


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks