Subject Re: [Firebird-Java] Re: How to retrieve a value from a Date field of a ResultSet
Author Roman Rokytskyy
> However, I hope you'll still look at my question again. You say I
> should use Calendar. That's exactly what I want! But how do I do
> this in this context? AFAIK, ResultSet hasn't got a method
> getCalendar - only a method getDate. So, how do I obtain a Calendar
> object with the date stored in a ResultSet's field? TIA

You can't obtain Calendar from ResultSet object. You should use Calendar the
same way you do this in normal applications:

Calendar calendar = Calendar.getInstance();

int year = calendar.get(Calendar.YEAR);

Some care should be taken with time zones...