-1

I'd like to replace now() with the current date and a custom time for example: 7/28/2021 8:00 AM

(select count(*) from students where exams.id=students.exam_id and students.exam_id=exams.id 
and end_time <> ''and bb_user_id is not null and test_status<>1 and
review_end is null and (exam_end + interval 2 day) > now() and exam_end < now()) as current
Vorcikle
  • 5
  • 2

1 Answers1

0

You can set the time on the current date using addtime():

select addtime(cast(current_date as datetime), time('08:00:00'))

Note that the first argument needs to be a datetime, so addtime(current_date, time('08:00:00')).

Gordon Linoff
  • 1,242,037
  • 58
  • 646
  • 786