I have a stored procedure that takes two parameters.
One is a int
and another is DateTime
that has to be formatted like this: YYYY-MM-dd HH:MM:SS
, but the parsing in C# gives me this format: dd-MM-YYYY HH:MM:SS
. This is the European format.
How can I parse it to be starting with year, like shown above.
I need it to be a DateTime and not a string, the stored procedure won't allow just string.