I'm doing an import of xml
tags to textbox
fields in Windows Form, but I'm not able to import the date fields into the correct format, for a masktextbox
in date format. to display the% in% of the date in the correct format textbox
.
Follow my code
DataSet ds = new DataSet();
ds.ReadXml(@"C:\Xml_Entrada\" + txt_chave.Text + ".xml");
txt_fornecedor.Text = ds.Tables["emit"].Rows[0]["xNome"].ToString();
txt_cnpj.Text = ds.Tables["emit"].Rows[0]["CNPJ"].ToString();
txt_nota.Text = ds.Tables["ide"].Rows[0]["nNF"].ToString();
txt_ie.Text = ds.Tables["emit"].Rows[0]["IE"].ToString();
txt_emissao.Text = ds.Tables["ide"].Rows[0]["dhEmi"].ToString();
txt_saida.Text = ds.Tables["ide"].Rows[0]["dhSaiEnt"].ToString();
Xml data
<dhEmi>2018-06-15T09:56:51-03:00</dhEmi>
<dhSaiEnt>2018-06-15T09:56:51-03:00</dhSaiEnt>