Results 1 to 3 of 3

Thread: Regional Settings

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 1999
    Location
    Belgium
    Posts
    98

    Post

    Hi,

    Who knows how to read the "Short date style" & "Date seperator" from the regional settings ?? And Who knows how to change those value's ??

    OS = 95, 98 & NT

    R@emdonck

  2. #2
    Guest

    Post

    I'm not sure if it's the easiest way to do what you're trying to do but in the past I have used 2 API calls to get the values from the registry. To read the values use the RegQueryValueEx API and ato edit them use the RegSetValueEx API.
    The registry values that you are interested in are: HKEY_CURRENT_USER\Control Panel\International\sDate

    and

    HKEY_CURRENT_USER\Control Panel\International\sShortDate


  3. #3
    Addicted Member
    Join Date
    Oct 1999
    Posts
    232

    Post

    You can use Format() function

    MyStr = Format(Time, "Short Time")
    MyStr = Format(Date, "Short Date")

    And for the Date separator:

    Function DateSeparator() As String

    Dim s As String * 1

    s = Right(Date, 3)
    DateSeparator = s

    End Function

    Usage: MsgBox "Date separator is " & DateSeparator

    ------------------
    smalig
    [email protected]
    http://vbcode.webhostme.com/


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width