liquibase-core/src/main/java/liquibase/database/core/AbstractDb2Database.java
@Override
    public String getDateLiteral(String isoDate) {
        String normalLiteral = super.getDateLiteral(isoDate);

        if (isDateOnly(isoDate)) {
            StringBuffer val = new StringBuffer();
            val.append("DATE(");
            val.append(normalLiteral);
            val.append(')');
            return val.toString();
        } else if (isTimeOnly(isoDate)) {
            StringBuffer val = new StringBuffer();
            val.append("TIME(");
            val.append(normalLiteral);
            val.append(')');
            return val.toString();
        } else if (isDateTime(isoDate)) {
            StringBuffer val = new StringBuffer();
            val.append("TIMESTAMP(");
            val.append(normalLiteral);
            val.append(')');
            return val.toString();
        } else {
            return "UNSUPPORTED:" + isoDate;
        }
    }
@Override
    public String getDateLiteral(String isoDate) {
        String normalLiteral = super.getDateLiteral(isoDate);

        if (isDateOnly(isoDate)) {
            StringBuffer val = new StringBuffer();
            val.append("DATE(");
            val.append(normalLiteral);
            val.append(')');
            return val.toString();
        } else if (isTimeOnly(isoDate)) {
            StringBuffer val = new StringBuffer();
            val.append("TIME(");
            val.append(normalLiteral);
            val.append(')');
            return val.toString();
        } else if (isDateTime(isoDate)) {
            StringBuffer val = new StringBuffer();
            val.append("TIMESTAMP(");
            val.append(normalLiteral);
            val.append(')');
            return val.toString();
        } else {
            return "UNSUPPORTED:" + isoDate;
        }
    }
@ Override public String getDateLiteral ( String isoDate ) { String normalLiteral = super . getDateLiteral ( isoDate ) ; if ( isDateOnly ( isoDate ) ) { StringBuffer val = new StringBuffer ( ) ; val . append ( "DATE(" ) ; val . append ( normalLiteral ) ; val . append ( ' ' ) ; return val . toString ( ) ; } else if ( isTimeOnly ( isoDate ) ) { StringBuffer val = new StringBuffer ( ) ; val . append ( "TIME(" ) ; val . append ( normalLiteral ) ; val . append ( ' ' ) ; return val . toString ( ) ; } else if ( isDateTime ( isoDate ) ) { StringBuffer val = new StringBuffer ( ) ; val . append ( "TIMESTAMP(" ) ; val . append ( normalLiteral ) ; val . append ( ' ' ) ; return val . toString ( ) ; } else { return "UNSUPPORTED:" + isoDate ; } }
Return an DB2 date literal with the same value as a string formatted using ISO 8601.
<p/>
Convert an ISO8601 date string to one of the following results:
to_date('1995-05-23', 'YYYY-MM-DD')
to_date('1995-05-23 09:23:59', 'YYYY-MM-DD HH24:MI:SS')
<p/>
Implementation restriction:
Currently, only the following subsets of ISO8601 are supported:
YYYY-MM-DD
hh:mm:ss
YYYY-MM-DDThh:mm:ss
Return an DB2 date literal with the same value as a string formatted using ISO 8601 . <p / > Convert an ISO8601 date string to one of the following results : to_date ( 1995 - 05 - 23 YYYY - MM - DD ) to_date ( 1995 - 05 - 23 09 : 23 : 59 YYYY - MM - DD HH24 : MI : SS ) <p / > Implementation restriction : Currently only the following subsets of ISO8601 are supported : YYYY - MM - DD hh : mm : ss YYYY - MM - DDThh : mm : ss