I am performing one task in which i have to compare one date time with current date but my problem is that I am storing date along with time in varchar datatype and i wanted to compare it with current date only.
My table structure is below.
EmpId VARCHAR(10), -- Value = GLO1, GLO2
Last_Run_Date VARCHAR(20), --Value = '2/20/2024 4:22:24 PM'
Task VARCHAR(20), --Value = Completed / Incomplete
my requirement is
SELECT EmpId, Last_Run_Date FROM Scheduler WHERE Task = 'Completed' AND Last_Run_Date = sysdate;
Last_Run_Date compare with only today date which is 20/02/2024.
I tried by using Like operator but no success.