• 1. you can use CONVERT function, to convert date both the sides to same style like this...

    status_code = ?(variable) and convert(varchar(10),[Created Date],112) = convert(varchar(10),?,112) (variable)

    2. to change date / status, use configuration file, which will ready dynamic values, you can modify any time.

    or use one table to store these two values and retrieve into variables and still use the above sql code, if you are not aware of configuration files.

    or you can use txt file too instead configuration file, however you need to write some code to read from txt file...

    or you can supply values in commandline command while running too...

    Please let us know if u need any help.