Hi, I want to add a short day to the current user locale format so that Date Time control displays the date with short day if user hasn't included it in his format. I can just add "ddd," at the start of date format and Date time control picks it up nicely. But, in many languages, having date as "Tue, 6/10/2008" isn't part of natural language. I can do the custom processing as per _every_ locale that user can set but I wanted to know if there is a way Windows can tell me, programmatically, in what format and where to put the short day format. Thanks in advance, -Neel.
> I want to add a short day to the current user locale format so that > Date Time control displays the date with short day if user hasn't > included it in his format. I can just add "ddd," at the start of date > format and Date time control picks it up nicely. But, in many > languages, having date as "Tue, 6/10/2008" isn't part of natural > language. Maybe the user did not include that in the format because he did not wanted it in the format? > I can do the custom processing as per _every_ locale that user can set > but I wanted to know if there is a way Windows can tell me, > programmatically, in what format and where to put the short day > format. I don't think there is any way that Windows can do that. You can either use GetDateFormat with DATE_LONGDATE, or try EnumTimeFormats and selecting from there a locale that looks like what you want (has Ddd or Dddd) -- Mihai Nita [Microsoft MVP, Visual C++] http://www.mihai-nita.net ------------------------------------------ Replace _year_ with _ to get the real email