469,291 Members | 1,742 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,291 developers. It's quick & easy.

Is there any function return the short date format on the regional and Language Options under control panel?

ABC
Is there any function return the short date format on the regional and
Language Options under control panel?
Apr 12 '06 #1
6 2161
Do you mean the formatter as in "h:mm:ss tt:

Iv'e done that before (can't remember when or even if iw was c#).

But I'm prettuy sure I just read it from a registry key...

-dm

Apr 12 '06 #2
Quickly looking at my XP box I find.

HKEY_CURRENT_USER\Control Panel\International\STimeFormat

Apr 12 '06 #3
ABC
under .NET framework, how to obtain this key value?
<th*********@gmail.com> wrote in message
news:11**********************@e56g2000cwe.googlegr oups.com...
Quickly looking at my XP box I find.

HKEY_CURRENT_USER\Control Panel\International\STimeFormat

Apr 12 '06 #4
Use the class "RegistryKey".

MSDN doco will explain it well enough for you.

-dm

Apr 12 '06 #5
If your obtaining this string for the purpose of creating a controll
panel substiture this is all fine.

However if what you realy mean to ask is "how do I correctly print
DateTime as short date using regional settings" then this aproach is
not for you.

Instead look up datetime format strings and the DateTime.ToString
function in msdn.

-dm

Apr 12 '06 #6
ABC
I need obtain the short date format string to display on my web site for
indicate users what date format to use. Also, the short date format apply
on all date text input and output.

<th*********@gmail.com> wrote in message
news:11**********************@v46g2000cwv.googlegr oups.com...
If your obtaining this string for the purpose of creating a controll
panel substiture this is all fine.

However if what you realy mean to ask is "how do I correctly print
DateTime as short date using regional settings" then this aproach is
not for you.

Instead look up datetime format strings and the DateTime.ToString
function in msdn.

-dm

Apr 12 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Penn Markham | last post: by
6 posts views Thread by Stewart Allen | last post: by
5 posts views Thread by Ishaan | last post: by
1 post views Thread by paulquinlan100 | last post: by
5 posts views Thread by snow | last post: by
7 posts views Thread by pb | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Geralt96 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.