User (Legacy) Posted August 7, 2006 Report Share Posted August 7, 2006 Line 456 DreamHouse Form1.cs date = (DateTime.Parse(e.Text)); Gives an error on when I run the samples on my danish configured PC I think you need to have a IFormatProvider to make this code secure from different PC configurations The following seems to work ( I have using.System.Globalisation;) if (e.Axis == chart1.AxisY) { date = (DateTime.Parse(e.Text,CultureInfo.InvariantCulture)); string weekday = date.DayOfWeek.ToString(); e.Text = weekday.Substring(0,1); } if (e.Axis == _weekAxis) { if (e.Text.Length != 0) { date = (DateTime.Parse(e.Text,CultureInfo.InvariantCulture)); int weekofyear = ((date.DayOfYear - 1) / 7) + 1; e.Text = "Week " + weekofyear.ToString() + ", " + date.Year.ToString(); } Regards Magnus Salgo Link to comment Share on other sites More sharing options...
Software FX Posted August 7, 2006 Report Share Posted August 7, 2006 Thank you for your feedback. -- Francisco Padron www.chartfx.com Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.