Time formats in Case statements

Database
KVB
Enthusiast

Time formats in Case statements

Hi

While I am writing the following query like

SELECT

CASE WHEN CURRENT_TIME >=CAST('18:00:00' AS TIME(0)) THEN 'SCHEDULED' END

It is returning NULL instead of the values.

Regards

KVB

1 REPLY
Enthusiast

Re: Time formats in Case statements

If your current_time is not greater than the time you specified it will return NULL.