I am using this code to truncate datetime from my database into its year and time components. The variables YearOfRelease and Runtime contain datetime of the format \"
The first parameter of DateTime.ParseExact is a string parameter named 's'.
Therefore, it looks like YearOfRelease or RunTime is null in your program. Make sure those are set before you call DateTime.ParseExact.