Error-Solution:The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.

INSERT INTO ProductSetup_Tab(ProductID,ItemName,Specification,Unit,Status,CreationDate)

VALUES(2,'Laptop','Core i7','PCS','Running',TRY_CONVERT(DATETIME,'20/05/2021',103)),

(3,'Laptop','Core i5','PCS','Running',TRY_CONVERT(DATETIME,'15/06/2021',103)),

(4,'Mouse','logitech','PCS','Running',TRY_CONVERT(DATETIME,'05/02/2020',103)),

(5,'Keyboard','Zebronics','PCS','Running',TRY_CONVERT(DATETIME,'10/04/2021',103)); 

Comments

Popular posts from this blog

Create a User Registration Form in ASP.NET using SQL Server, Visual Studio 2022 & Bootstrap

Create a Simple Login Form in ASP.NET using Visual Studio 2022

SqlCommand Class ADO.Net | ExecuteNonQuery | ExecuteReader | ExecuteScalar