How to insert kotlin datetime into sqldelight can ...
# multiplatform
v
How to insert kotlin datetime into sqldelight can someone share any example
s
This is using
java.time.*
but I hope to change to KotlinX Datetime soon. Does that now work for KotlinX Datetime? https://github.com/nomisRev/ktor-arrow-example/blob/4cdb261266ee4755b7279a7b22e7944200eba83e/src/main/kotlin/io/github/nomisrev/config/sqldelight.kt#L23
This is how it's declared in the schema.
createdAt TIMESTAMP AS LocalDateTime NOT NULL
j
Yeah doing this is pretty standard for adapters. Was something unclear in the docs?
What did you try that didn't work?