I have the following question: How to put an automatic date in SQL Server or in C #?
For example in this query :
SELECT id,Registration FROM tbl_CRs
WHERE Registration BETWEEN '20170201' AND '20170216'
and [Status]='OPEN'
In C # it would be something like this:
string query = "SELECT id,Registration FROM tbl_CRs WHERE Registration BETWEEN '" + LblMes.Text + "' and '"+LblHoy.Text+"' ";
As you may have noticed, I put today's date, it makes a comparison of the first day of this month, but when it is March, I want you to make a comparison of the first day of March, and so on. I want the first parameter I declare in the where
to be changed to the first day of the future months.