0

I have a table that holds few records less than 20. The table (cow_inactive) is just with ID (int) & COW_INACTIVE_DATE (varchar) columns. I am trying to use the DATEDIFF to get all cows that are ready for insemination after 60 Days of being inactive.

SELECT * from cow_inactive where DATEDIFF(CURRENT_DATE, inactive_date)>=60 

Result : Showing rows 0 - 0 (1 total, Query took 0.0022 seconds.)

brombeer
  • 8,716
  • 5
  • 21
  • 27

1 Answers1

0

you need to update field data type COW_INACTIVE_DATE (DATETIME). then run above query

pmali
  • 67
  • 1
  • 6
  • Please seek to resolve questions using pre-existing pages first. If a question is truly unique (this is very rare on Stack Overflow after millions of questions have been asked), then feel free to answer. – mickmackusa Nov 30 '20 at 08:32