Handling of DATE and TIME values

From: Todd O'Bryan (toddobrya..ac.com)
Date: Wed Dec 07 2005 - 05:13:18 EST

  • Next message: Emre Yilmaz: "C-JDBC authentication failed"

    If I use a Date object to match a DATE or TIME field in a database,
    does Cayenne automatically do the right thing or do I have to fiddle
    with the values myself? (By that, I mean do I need to set the time to
    0:00:00 before I try to match a Date to a DATE field, or set the date
    to Jan 1 1970 before I try to match a TIME field?)

    If the latter, how do people deal with this? All the methods to
    manipulate parts of a Date have been deprecated. You can fiddle with
    things correctly in GregorianCalendar and convert that to a Date,
    but, as far as I can tell, there's no easy parseDate(String) method
    that returns a GregorianCalendar and there's no way to convert the
    other way, i.e., from Date to GregorianCalendar.

    Surely I'm missing something, right?

    TIA,
    Todd



    This archive was generated by hypermail 2.0.0 : Wed Dec 07 2005 - 05:13:24 EST