I am trying to convert and store a date in the form of String into datetime variable. 

```
String fromdate= "02-JUN-2014";
DateTime dFromDate = Convert.ToDateTime(fromdate);

```

This dfromDate is used in another function which expects date to be in 02-JUN-2014 format.But since dfromDate storing the date as 06/02/2014, there is a format exception.