See script for further instructions. You can use it as a simple select statement, put it in code, or any other way you see fit. This script is about as basic as it comes.
The getdate() function in the script is only used for example purposes only. Use what ever date you feel like or adjust to use a different input parameter.