Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to find out what date format is being used on a computer? 1

Status
Not open for further replies.

MikeBronner

Programmer
May 9, 2001
756
US
I would like to find out what date format is being used on the computer, in order to correctly validate dates being input by the user.

Are there any APi calls or something similar to find this out? Best Regards and many Thanks!
Michael G. Bronner X-)

"Beer makes you feel the way you ought to feel with out beer." Henry Lawson

 
Hello,
I found out how to do this recently (about 2 months ago), however, I don't have the code with me right now. You can either use the GetDateFormat() API function with the SYSTEMTIME structure, or the GetLocaleInfo() API function. I believe I used the GetLocaleInfo() to get the date format. Check the MSDN online for examples.
Rob Marriott
rob@career-connections.net
 
Thanks Rob! :) Best Regards and many Thanks!
Michael G. Bronner X-)

"Beer makes you feel the way you ought to feel with out beer." Henry Lawson

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top