0

I am having problems with date formatting for a website aimed at Polish Clients. When entering a calendar entry it is switching the month and the date. e.g it puts the entry in 7th September instead of 9th July.

The problem seems to be a datetime.parse statement as follows

DateTime.Parse(txtCalendarDate.Text)

This supposedly uses the current culture which is Polish. Polish has the day/month the right way round so why is it switching them?

Please assist.

Patrick Hofman
  • 153,850
  • 22
  • 249
  • 325
T Baldwin
  • 3
  • 3

1 Answers1

0

I finally solved this by doing System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern = "dd/MM/yyyy"; in my global.asax. It was yyyy/MM/dd for Polish

T Baldwin
  • 3
  • 3