I am getting date as string parameter that is ExpDate as 12/16(month/year), i need to convert it as DateTime and save it to the sql db, i convert the above string to date as
paymentMethod.ExpirationDate = Convert.ToDateTime(ExpDate);
this absolutely working in my machine and saved in my db. but this is throws an error in my colleague's machine as
String was not recognized as a valid DateTime.
i have googled it and i come to know that i need to do cultureinfo. but i am getting the date as MM/yy only that is why i cant go through it. can anyone tell what do i need to do here?