Exposed Kotlin Oracle Date

Hey,
so i have problems with Exposed Kotlin and querying the date type column.

dbQuery{
        Register.select {
            Register.par_sifpp.eq((par_sifpp))
            Register.dat_od.between(date_from, date_to)
        }.mapNotNull { rowToRegister(it) }
    }

But i get this exception from oracle database: “org.jetbrains.exposed.exceptions.ExposedSQLException: java.sql.SQLDataException: ORA-01861: literal does not match format string”

I have when i was mapping the table through Exposed i have initialize that this “dat_od” field is date, but it is in wrong data type , it is in joda.DateTime and if i want query to work i need java.sql.Date . I wish i could create my own between and columntype . DateTime format is in “YYYY-MM-DD” and i can’t make this to change in other format, i can convert so that it writes string but format of actually datetime it seems to me not changable .

Thank you .

Hi there,

I never used Exposed with dates but I noticed there is a exposed-java-time module that provides the JavaDateColumn, which seems to be what you are looking for. Try adding exposed-java-time to your dependencies and replace the column type.