convert string to datetime format in c# code example Example: c# string to datetime .Net str to DateTime