Ashkan
You aren't actually using your variables in the SQL, you are using the strings Begin_Of_Day and End_Of Day.
By the way I think both threads are in the wrong forums.
This forum is for questions in foreign languages and the other is for general discussion, as it's title suggests.
Contact a moderator and have them moved to more appropriate forums.