"error converting data type nvarchar to datetime", help pls | Sololearn: Learn to code for FREE!

0

"error converting data type nvarchar to datetime", help pls

string daf = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss tt"); I faced exception error that says "error converting data type nvarchar to datetime". Above are the line that produce the error. I have change it many times and follow some tips from google, but still got error. Do you guys have any idea how to do it?

9/17/2021 11:56:03 AM

Azfar Hafiz Ahmad

1 Answer

New Answer

0

You're storing dates in nvarchar?