Problem : Cannot implicitly convert type ‘string’ to ‘System.DateTime’

Problem : Cannot implicitly convert type ‘string’ to ‘System.DateTime’

I am trying to initialize a data variable.  I initializing the variable to 0’s but when I saved it to the database the database gave an error message of

SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.

Now, I am trying to set the variable to this date and time for the initilization.  When I try to set the variable it gives me the Cannot Implicitly convert type ‘string’ to SystemDateTime.

Can someone show me the correct syntax to accomplish this task?

Here is my code:

DateTime dt = new DateTime();

if (dt.CompareTo(new DateTime()) == 0)
{
// Date is set to min, 1/1/0001 12:00:00 AM
// SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.

dt = “1/1/1753 12:00:00 AM”;

}
else
{
MyGlobalVars.dob = Convert.ToDateTime(userrec.patuser.dob);


Solution: Cannot implicitly convert type ‘string’ to ‘System.DateTime’

Initialize using the SqlDateTime MinValue:

dt = System.Data.SqlTypes.SqlDateTime.MinValue.Value;


Visual C Sharp