I'm using a computed feild to compare a field called DUE_DATE to today's date. My problem is that DUE_DATE is formatted YYYY-MM-DD 00:00:00.000. When check to see if DUE_DATE is equal to GetDate() (i.e. today's date) the value of GetDate() is YYYY-MM-DD 11:13:28.943 so my camparsion is always false even if they are the same day as the exact time is different.
Is there a way to ingnore the timestamp for my comparision?
Solved! Go to Solution.
Solved by bastien.mazeran. Go to Solution.
Hi,
You could use CONVERT(DATE,GETDATE()) command to only return the date.
And for a date other than now, you could use syntax below:
CONVERT(DATE,'2013-08-06 11:13:28.943')
I hope this will help you compare the two dates.
Regards,