T
Tim
Hi,
The following code works just fine in VS 2003 but in VS 2005 I am getting an
error:
The code:
DateTime dClose = System.Convert.ToDateTime(now.Date.ToString("MMM dd,
yyyy") + " " + storeClose.Hour + ":" + storeClose.Minute);
The error:
threw an exception of type 'System.IndexOutOfRangeException'
base {System.SystemException}: {"Index was outside the bounds of the
array."}
now.Date.ToString("MMM dd, yyyy") gives me "Jan 09, 2006"
storeClose.Hour gives me 17
storeClose.Minute gives me 30
The whole string is "Jan 09, 2006 17:30" which should convert to a date no
problem. Can someone help?
Tim
The following code works just fine in VS 2003 but in VS 2005 I am getting an
error:
The code:
DateTime dClose = System.Convert.ToDateTime(now.Date.ToString("MMM dd,
yyyy") + " " + storeClose.Hour + ":" + storeClose.Minute);
The error:
threw an exception of type 'System.IndexOutOfRangeException'
base {System.SystemException}: {"Index was outside the bounds of the
array."}
now.Date.ToString("MMM dd, yyyy") gives me "Jan 09, 2006"
storeClose.Hour gives me 17
storeClose.Minute gives me 30
The whole string is "Jan 09, 2006 17:30" which should convert to a date no
problem. Can someone help?
Tim