Skip to content
Advertisement

Tag: datetime

SQLDateTime OverFlow with Correct DateTime Format

below is my code snippet where I insert a DateTime value to SQL database and encountered the following error: System.Data.SqlTypes.SqlTypeException: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM. May I know if there is a format to be used? when converting the value of row.DeliveryDate? Answer actually the problem is SQL DateTime =/= C# Datetime you

Advertisement