I found a query on data.stackexchange.com (Interesting unanswered questions) and wanted to make a variation with an optional datetime variable to avoid getting questions that are very old in the results.
I hard coded a date six months in the past DECLARE @FromDate datetime = ##FromDate?2018-06-01##
which works okay for now, But I would like to future-proof it.
Is it possible to assign a default date which is dynamically six months in the past in a not-too-round about way?