0

I have a list of date and I want them to be enabled in the calendarwidget of my application. The calendar widgets allows me to give only the list of dates that needs to disabled.

enter image description here

The issue is in the widget I am using I can give only the list of DisabledDates. I have converted the above dates in to the format 2015-3-6,2015-3-8,2015-3-7,2015-5-4,2015-5-7,2015-5-12,2015-6-16,2015-7-2,2015-10-19

But I need to get the rest of the dates in the calendar in the above format. I am not sure how do I get. Any leads is highly appreciated.

xyz
  • 531
  • 1
  • 10
  • 31
  • Look up how NOT IN works. You can just provide a list of dates that you want, and get back those not on that list. – durbnpoisn Jan 29 '16 at 19:25

1 Answers1

1

You have 3 options.

Option 1: Use MySQLs 'Not In' function.

MySQL "NOT IN" query

Option 2&3: Use MySQLs 'Left Join' or 'Right Join' function.

What's the difference between INNER JOIN, LEFT JOIN, RIGHT JOIN and FULL JOIN?

Community
  • 1
  • 1
Sari Rahal
  • 1,897
  • 2
  • 32
  • 53
  • Sari Rahal, How do I get the list of all dates in 2015 or 2016 to perform NOT IN Query. – xyz Mar 03 '16 at 14:36
  • You would do something like this: SELECT * FROM table WHERE NOT Date="2015" AND NOT Date="2016"; OR you can do this : SELECT * FROM table WHERE Date != "2015" AND Date != "2016" – Sari Rahal Mar 03 '16 at 20:31