I have an events channel where each entry has three custom date/time fields:
startDate (Date Only)
startTime (Time Only)
endTime (Time Only)
I was originally using this code to set my entries, but it causes problems if they aren't all entered on the same day:
{% set allEntries = craft.entries.section('sparkSchedule').limit(null).orderBy('startDate asc').all() %}
I've seen answers from Craft 2 saying that i could use time(startTime) to sort by just the time portion of my startTime field:
{% set allEntries = craft.entries.section('sparkSchedule').limit(null).orderBy('startDate asc, time(startTime)').all() %}
but when I do that, i get this error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'startTime' in 'order clause'
Am I doing something wrong?