I'm trying to use `DATE_ADD` (<https://dev.mysql.c...
# squarelibraries
e
I'm trying to use
DATE_ADD
(https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_date-add) in an sql statement with sqldelight, but sqldelight complains
'(', ')', '.', <binary like operator real>, BETWEEN or IN expected, got '6'
The used SQL code:
date_add(current_date() , interval 6 month)
Am I doing something wrong or is there a workaround for such a case?
e
Ah okay. Workaround for the moment (if someone else comes along the problem)
Copy code
makedate(year(current_date()), dayofyear(current_date()) + 183)
It's of course not accurate, but at least enough for me.
a
👍 can you file a bug on sqldelight for this?
👍 1
a
🙏