E Elliot Dec 13, 2007 #1 How can to save a string("13/12/2007") in a field which datatype is date in the table? field["dob"] = xxx?
How can to save a string("13/12/2007") in a field which datatype is date in the table? field["dob"] = xxx?
M Mark Rae [MVP] Dec 13, 2007 #2 How can to save a string("13/12/2007") in a field which datatype is date in the table? field["dob"] = xxx? Click to expand... field["dob"] = Convert.ToDateTime("13/12/2007"); field["dob"] = DateTime.Parse("13/12/2007"); field["dob"] = ParseExact("13/12/2007", "dd/MM/yyyy", null);
How can to save a string("13/12/2007") in a field which datatype is date in the table? field["dob"] = xxx? Click to expand... field["dob"] = Convert.ToDateTime("13/12/2007"); field["dob"] = DateTime.Parse("13/12/2007"); field["dob"] = ParseExact("13/12/2007", "dd/MM/yyyy", null);
M Mark Rae [MVP] Dec 13, 2007 #3 field["dob"] = ParseExact("13/12/2007", "dd/MM/yyyy", null); Click to expand... Apologies - slip of the Enter key... field["dob"] = DateTime.ParseExact("13/12/2007", "dd/MM/yyyy", null);
field["dob"] = ParseExact("13/12/2007", "dd/MM/yyyy", null); Click to expand... Apologies - slip of the Enter key... field["dob"] = DateTime.ParseExact("13/12/2007", "dd/MM/yyyy", null);
E Elliot Dec 13, 2007 #4 Useful! Thanks again. Mark Rae said: field["dob"] = ParseExact("13/12/2007", "dd/MM/yyyy", null); Click to expand... Apologies - slip of the Enter key... field["dob"] = DateTime.ParseExact("13/12/2007", "dd/MM/yyyy", null); Click to expand...
Useful! Thanks again. Mark Rae said: field["dob"] = ParseExact("13/12/2007", "dd/MM/yyyy", null); Click to expand... Apologies - slip of the Enter key... field["dob"] = DateTime.ParseExact("13/12/2007", "dd/MM/yyyy", null); Click to expand...