accurate time of Date in SQLTemplate

From: Alan Guo (AGU..ndependenthealth.com)
Date: Mon May 23 2005 - 09:37:23 EDT

  • Next message: Alan Guo: "Re: accurate time of Date in SQLTemplate"

    Hi, All,

    I used SQLTemplate to get a date from Oracle db using cayenne SQLTemplate as following:

    String ssql = "select lastchangedate from logindata";
    SQLTemplate query = new SQLTemplate(LoginData.class,s sql, true);
    List resultList = context.performQuery(query);

    DataRow dw = (DataRow) resultList.get(0);
    String idkey = new String("LASTCHANGEDATE");
    Date ddd1 = (Date)dw.get(idkey);

    Then I format the ddd1 into a string using "MM/dd/yyyy HH:MM a" format.

    What I found out is that hour and minute are not right from the accural time in DB.

    Could anyone let me know what the problem is using SQLTemplate to get the Date this way?

    Thanks,

    Alan

    CONFIDENTIALITY NOTICE. This e-mail and attachments, if any, may contain confidential information which is privileged and protected from disclosure by Federal and State confidentiality laws, rules or regulations. This e-mail and attachments, if any, are intended for the designated addressee only . If you are not the designated addressee, you are hereby notified that any disclosure, copying, or distribution of this e-mail and its attachments, if any, may be unlawful and may subject you to legal consequences. If you have received this e-mail and attachments in error, please contact Independent Health immediately at (716) 631-3001 and delete the e-mail and its attachments from your computer. Thank you for your attention.



    This archive was generated by hypermail 2.0.0 : Mon May 23 2005 - 09:37:51 EDT