Skip to content
Advertisement

Tag: date

Categorize datetime value to shifts where shift ends on the next day

I have a MySQL query for example: My table only have qty and filedatetime columns. Based on this query is it possible to query out the following conditions: if filedatetime is filedatetime >= ‘2019-08-01 06:30:00’ and filedatetime < ‘2019-08-01 18:30:00’ then assign value ‘Day’ to column shift assign value ‘2019-08-01’ to column shiftDate if filedatetime >= ‘2019-08-01 18:30:00’ and filedatetime

Advertisement