Hi All
I have the following code which currently saves date to the DB as follows 1975-11-01 00:00:00.000 (yyyy-dd-MM hh:mm:ss)
String stringValue = string.Empty;DateTime dateValue;//create objectvar reg = new Registration();registration.FirstName = (csv.TryGetField<string>("FirstName", out stringValue)) ? stringValue: string.Empty;registration.LastName = (csv.TryGetField<string>("LastName", out stringValue)) ? stringValue: string.Empty;registration.Phone = (csv.TryGetField<string>("Phone", out stringValue)) ? stringValue: string.Empty;if (csv.TryGetField<DateTime>("DOB", out dateValue))registration.DOB = dateValue;
What i would like to do is save the DOB date as 1975-01-11 00:00:00.000 (yyyy-MM-dd hh:mm:ss). So far all i have seen is conversion errors
What am I missing please?
I have tried dateValue.ToString(&q ...
Go to the complete details ...