how can i pass 3 parameters to form a date in sql for example @year @month @day
Basically my program sends the parts of the date seperatly and i want them to be joined in the stored procedure.
how can i pass 3 parameters to form a date in sql for example @year @month @day
Basically my program sends the parts of the date seperatly and i want them to be joined in the stored procedure.
Here is SO answer to a similar question.
CAST(CAST(y AS varchar) + '-' + CAST(m AS varchar) + '-' + CAST(d AS varchar) AS DATETIME)
(I assume you know how to pass 3 parameters to stored procedure)