Skip to main content
Corrected name for char literal.
Source Link
ProfK
  • 51k
  • 126
  • 414
  • 796

Use

DateTime.Now.ToString("yyyy'/'MM'/'dd");

/ - the date separator. It will be replaced according current culture. So you need enclose it with char literal string delimiter (') to use it like char.

http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx#dateSeparator

Use

DateTime.Now.ToString("yyyy'/'MM'/'dd");

/ - the date separator. It will be replaced according current culture. So you need enclose it with literal string delimiter (') to use it like char.

http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx#dateSeparator

Use

DateTime.Now.ToString("yyyy'/'MM'/'dd");

/ - the date separator. It will be replaced according current culture. So you need enclose it with char literal delimiter (') to use it like char.

http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx#dateSeparator

Source Link
Andrey
  • 777
  • 6
  • 12

Use

DateTime.Now.ToString("yyyy'/'MM'/'dd");

/ - the date separator. It will be replaced according current culture. So you need enclose it with literal string delimiter (') to use it like char.

http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx#dateSeparator