4
How to put the string 22012018 What is a date in American format to save in the database? The code below returns me the value:
2018-22-01
I mean, YEAR-DAY-MONTH
The right one would be YEAR-MONTH-DAY
EstFData = Path.GetFileName(arquivo).Substring(4, 8).Trim();
EstFData = EstFData.Substring(4, 4) + "-" + EstFData.Substring(3, 2) + "-" + EstFData.Substring(0, 2);
One detail: to save in the bank, you can inform only the
DateTime
and not the string, so the bank itself takes care of the format it is working on– Rovann Linhalis