Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Windos
win32.3rdparty
win32.directx.audio
win32.directx.ddk
win32.directx.graphics
win32.directx.input
win32.directx.managed
win32.directx.misc
win32.directx.networking
win32.directx.sdk
win32.directx.video
win32.dirx.grap.shaders
win32.gdi
win32.international
win32.kernel
win32.messaging
win32.mmedia
win32.networks
win32.ole
win32.rtc
win32.tapi
win32.tapi.beta
win32.tools
win32.ui
win32.wince
win32.wmi
windows.mediacenter
winfx.aero
winfx.announcements
winfx.avalon
winfx.collaboration
winfx.fundamentals
winfx.general
winfx.indigo
winfx.sdk
winfx.winfs
  
 
date: Mon, 9 Jun 2008 21:45:33 -0700 (PDT),    group: microsoft.public.win32.programmer.international        back       


Date format - manipulating according to locale   
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.
date: Mon, 9 Jun 2008 21:45:33 -0700 (PDT)   author:   unknown

Re: Date format - manipulating according to locale   
> 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
date: Tue, 10 Jun 2008 23:30:32 -0700   author:   Mihai N.

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us