I would like to convert a date string to a datetime value. I found a thread on doing that using DateTime.TryParse and that works fine. However, I would like to know why I can't get the datetimeconverter to work. Here's what I tried. I always ended up with a date time value of 1/1/0001. Although I have shown hard-coded strings here, in my test, I was using strings passed as parameters and used paramstring.ToString() for the string value, if that makes any difference. Thanks.
DateTime dtBegDate;
DateTime dtEndDate;
string dstrBegDate = '1/1/2006';
string dstrEndDate = '12/31/2006';
TypeDescriptor.GetConverter(dtBegDate).ConvertFrom(dstrBegDate);
TypeDescriptor.GetConverter(dtEndDate).ConvertFrom(dstrEndDate);
Linda Harmes
HiBit Technologies, Inc.