This is code 

```
String date = "1980/1/1"; 
DateTime dateTime = DateTime.ParseExact(date, "yyyy/MM/DD", null);
// I have also tried 
// DateTime dateTime = DateTime.ParseExact(date, "yyyy/MM/DD", CultureInfo.InvariantCulture);

```

and this is Exception 

> 
> String was not recognized as a valid DateTime.
> 
> 
> 

**Update**

Getting same error using following code

```
 DateTime dateTime = DateTime.ParseExact(date, "yyyy/M/D", null);

```