Peter Kiers
asked on
How to get the CultureInfo of the pc and convert de DayOfWeek string
Hi,
Here is a part of my methode. The colde-line that I have marked with an arrow
is the code that I can not convert to the currentculture of the pc.
Who can help me?
Peter
Here is a part of my methode. The colde-line that I have marked with an arrow
is the code that I can not convert to the currentculture of the pc.
private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
XmlNodeList LoopNodes;
DateTime DT1;
DateTime TM1;
string VAL;
try
{
XmlDocument doc = new XmlDocument();
doc.Load("XML//G503123.XML");
LoopNodes = doc.GetElementsByTagName("BG");
gridView1.BeginUpdate();
BindingSource currentBindingSource = grdGlucs.DataSource as BindingSource;
DataView dataViewList = currentBindingSource.List as DataView;
dataViewList.Table.Rows.Clear();
foreach (XmlNode node in LoopNodes)
{
DT1 = DateTime.Parse(node.Attributes["Dt"].Value);
TM1 = DateTime.Parse(node.Attributes["Tm"].Value);
VAL = node.Attributes["Val"].Value;
DataRowView newDataRow = (currentBindingSource.AddNew() as DataRowView);
newDataRow["Day"] = DT1.DayOfWeek.ToString(); <==============
newDataRow["Date"] = DT1.Date.ToString("d");
newDataRow["Time"] = TM1.ToString("t");
newDataRow["Value"] = VAL;
try
Who can help me?
Peter
http://support.microsoft.com/kb/306162
Is this a WinForms or ASP.NET application.
ASKER
I use Microsoft Visual Studio 2010 and I programm in C#.
Can someone please help me, and not just sending url's.
Peter
Can someone please help me, and not just sending url's.
Peter
Certainly, but you haven't answered my question = )
ASKER
Sorry for a late response:
Its WinForms application.
Peter
Its WinForms application.
Peter
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
cactus_data you gave me the righ solution. 500 p's are comming to you.
Greetings,
Peter Kiers
Greetings,
Peter Kiers
Thanks. You are welcome!
/gustav
/gustav