1
I’m getting the following date Thu Sep 01 00:00:00 BRT 2016
and need to convert to dd/MM/yyyy HH:mm:ss
Only that the Convert generates error, I’m receiving this date via string
of a System.
Can someone help me?
DateTime dtPeca;
dtPeca = Convert.ToDateTime(linha[4]);
Yes the Date is always in this format, so I have to do the conversion. that "date" I put the value I get ?
– Renan Silveira
@Renansilveira Yes, because that’s what I did in my answer.
– Jéf Bueno
the output value of dateValue is the initial value (01/01/0001), it does not take the converted value.
– Renan Silveira
@So it is because the input string is not format that you posted in the question =)
– Jéf Bueno
"Sun Jan 01 00:00:00 BRST 2017" That’s the amount I collect
– Renan Silveira
@Compare with the value you put in the question and will see the difference. Then just adapt in the answer and everything will work normally.
– Jéf Bueno