public Field<Integer> periodDiff(final Field<? extends Date> date1,
                                     final Field<? extends Date> date2) {
        return DSL.field("period_diff(extract(year_month from {0}), extract(year_month from {1}))",
                SQLDataType.INTEGER, date1, date2);
    }
Converts a time in millis since epoch to a {@link Date}
stroom-db-util/src/main/java/stroom/db/util/JooqHelper.java