My application provides an export function to create a text file that can be imported to another software. The export file, has to look exactly like the other software has specified, in terms of formatting etc.
There is a date field that has to be in the format "yyyy/MM/dd HH:mm:ss".
The following code is used to write the line containing the date:
txt += " Started at: " + System.DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss")+"\n";
Now when i look at the created text file, the date is in the wrong format, its formatted as following:
yyyy.mm.dd HH:mm:ss
I tried to swap out some characters to see if its a general issue, but it seems related to /
, when i replace the /
by _
or -
it works as expected, even if only switch one of the three /
, only the /
gets wrongly converted into a point.
What could be the issue here?