Formatting ToShortDateString to dd/MM/yyyy Formatting ToShortDateString to dd/MM/yyyy asp.net asp.net

Formatting ToShortDateString to dd/MM/yyyy


ToShortDateString does not have an overload which takes any parameter.

If your ToShortDateString() returns MM/dd/yyyy format, that means your CurrentCulture has this format in it's ShortDatePattern property.

You can always use custom formatting for that like with proper culture like;

TextBox2.Text = DateTime.Today.ToString("dd/MM/yyyy", CultureInfo.InvariantCulture);