[Solved] Pass date from postman to Controller Error: converting data type NVARCHAR to DateTime

on Jun 23, 2022 04:31 AM

I am passing date from postman to my controller, but during insert in sql it is getting an error.

Error converting data type nvarchar to datetime. 

During debugging code date formate get changes i.e. '{23-06-2022 09:34:02}' and then it is getting an error.
Download FREE API for Word, Excel and PDF in ASP.Net: Download
on Jun 23, 2022 04:31 AM
Hi @pandeygolu4200,
Please try the following

Pass Class object from View to Controller using jQuery AJAX and save in database in ASP.Net MVC

It might help you.

Cheers Andrea.