Enter a date into t-sql?

Newb-ish question, is there any easy way to enter a date to use as a variable in t-sql?

Like, i’m not going to be able to create an alltime variabe, but something like

IF_date="_____" where inside the quotes is the function that prompts the user for a date in a certain format.

Then you can use later in your code conditions like " where effective_date <= IF_date and IF_date < end_date"

till all are one,


EDIT: found it, EFFECTIVE_DATE<= convert(varchar, :entered_date, 20) then use ‘2021-01-01 00:00:00’ style of a date.