473,320 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 2352
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Penn Markham | last post by:
Hello all, I am writing a script where I need to use the system() function to call htpasswd. I can do this just fine on the command line...works great (see attached file, test.php). When my...
8
by: Ishbel Kargar | last post by:
Since upgrading from old laptop (Windows 98) to new laptop (Windows XP), my mail-merge letters are doing strange things with date formats. For instance, my reminder letter for lapsed subs carries...
6
by: Stewart Allen | last post by:
Hi, I'm having trouble with the DMin function in finding the next date in the table that is greater than or is the same the date entered; The dates in the table's field are 04/18/02 06/16/02...
5
by: Ishaan | last post by:
Hi, Is there any way to pick the data format from operating system settings using C#? I am doing an ASP.Net Application. -- Software engineer Petroleum Development Oman
1
by: ABC | last post by:
Is there any function return the short date format on the regional and Language Options under control panel?
1
by: paulquinlan100 | last post by:
Hi I have a date field which when i enter the date in some places, works fine, however, when trying to enter dates on certain rows i get the message: "The value you entered isn't valid for...
0
by: SharmaPunit | last post by:
I want to display a date in m/d/yy format. I have written the following lines of code and it is running perfectly till the date format in the regional settings of my computer is set to mm/dd/yyyy or...
5
by: snow | last post by:
Hi All, ToOADate can change a date value to a double value, but if I change the Regional and Lauguage setting in control panel, for example, change English(US) to English(Australia) , the same...
7
by: pb | last post by:
Hi, I am updating a database based and adding the time the entry was added with the query below... strQuery = "INSERT INTO Visits ( EmailAddress, , TimeCreated ) values ('" & emailaddress &...
1
by: Doug | last post by:
Hi, I created a short date field. The format is dd/mm/yyyy when displayed. The input mask is set to 99/99/00;0 (default, I didn't type anything). If I edit an existing date, say change...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.