c# how to create a datetime different strings code example Example: c# string to datetime .Net str to DateTime