DateTimeControl date format
-
I'm trying to set the format of my DateTimeControls to yyyy/mm/dd but the only method I can find is through the localeid property. The only locales that use yyyy/mm/dd as their primary format are non-english, so they don't help me much. The government standard in Canada (where I am) is yyyy/mm/dd but as a nation all three primary formats are used. Is there any way to select which format I want to use, or am I stuck with Microsoft's default, dd/mm/yyyy? Thanks ahead of time for any assistance!
-
I'm trying to set the format of my DateTimeControls to yyyy/mm/dd but the only method I can find is through the localeid property. The only locales that use yyyy/mm/dd as their primary format are non-english, so they don't help me much. The government standard in Canada (where I am) is yyyy/mm/dd but as a nation all three primary formats are used. Is there any way to select which format I want to use, or am I stuck with Microsoft's default, dd/mm/yyyy? Thanks ahead of time for any assistance!
Well...first of all the date format is driven by the locale set in the installed version of Windows. This is a LOCALE default NOT a Microsoft default. That said you need to look at how the locale is set either on your machine or on your machine AND your servers. Locale defines your formatting for money, dates, etc. Now if you MUST display the date in that format the first question is if that format is included in the Canadian locale definition? At the Region and Language settings within Windows 7, I'm allowed to set Short Date format to yyyy-mm-dd and I expect that the operating system level is where you will get that set for your code.