Dear Programmer, I have a data column named year and have data type DATETIME
Year DATETIME NULL
aspx.cs
DATETIME MyYr = DATETIME.NOW;
string Yr = MyYr.DATETIME.ToString("yy")
//yy= 18 (2018)
But when we execute this query than we have got a error as like -
Error datatype failed conversion from nvchar to DATETIME.
Note - Please help me out.