Closed devoll closed 9 years ago
I have solution. Just use orm.Text()
:
events.aggregate(['status_date'])
.call('DATE_FORMAT', ['status_date', orm.Text('%Y-%m-%d')]).as('dt')
.count('id')
.groupBy('dt')
.get(callback);
Hello guys,
I want to use MySQL function
DATE_FORMAT
, but I don't know how to use static value (not a column name):Do you have any ideas?
Thanks!