I have a huge problem with the following code:
DateTime date = DateTime.Now; String yearmonthday = date.ToString("yyyy/MM/dd"); MessageBox.Show(yearmonthday);
the problem is that C # uses a system date separator instead of always using "/" as I pointed out. If I run this code, I get the following output:
2011/03/18
but if I go to "control panel" β "regional and language settings" and change the date separator to "-", I get
2011-03-18
Even if in the toString method I indicated to use '/'. Am I missing something or is it a C # /. Net Framework error?
c # datetime
kaharas
source share