Search This Blog
Wednesday, May 22, 2013
Essential Date functions for ADF
public static java.util.Date convertSqlToUtilDate(java.sql.Date date) {
Date utilDate = null;
if (date != null) {
utilDate = new Date(date.getTime());
}
return utilDate;
}
public static oracle.jbo.domain.Date convertSqlToJboDate(java.sql.Date date) {
oracle.jbo.domain.Date jboDate = null;
if (date != null) {
jboDate = new oracle.jbo.domain.Date(date);
}
return jboDate;
}
public static java.sql.Date convertUtilToSQLDate(java.util.Date date) {
java.sql.Date sqlDate = null;
if (date != null) {
sqlDate = new java.sql.Date(date.getTime());
}
return sqlDate;
}
public static oracle.jbo.domain.Date convertUtilToJboDate(java.util.Date date) {
oracle.jbo.domain.Date jboDate = null;
if (date != null) {
jboDate = new oracle.jbo.domain.Date(convertUtilToSQLDate(date));
}
return jboDate;
}
public static java.sql.Date convertJboToSqlDate(oracle.jbo.domain.Date date) {
java.sql.Date sqlDate = null;
if (date != null) {
sqlDate = (Date)date.getValue();
}
return sqlDate;
}
public static java.util.Date convertJboToUtlDate(oracle.jbo.domain.Date date) {
java.util.Date sqlDate = null;
if (date != null) {
sqlDate = (java.util.Date)date.getValue();
}
return sqlDate;
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment