Date comparison using bindingsource filter property and RRS feed

  • General discussion

  • Hi,

    Just spent some frustrating times trying to do a date comparison using a bindingsource to a ms sql table. My error was to use the CONVERT function, only to find that the SQL CONVERT function is different to the .NET one. What worked in the end for is as follows...any comments :)

    BindingSource.Filter =

    "(bkcatavailtype = 'A') AND (bkcatdate < Convert('1956/10/15 00:00:00','System.DateTime'))"

    I'd like to thank the great soul on the internet somewhere that pointed me to this (not in this forum)

    Have a great day.


    Saturday, November 5, 2011 3:30 AM