Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2003
    Location
    India
    Posts
    10

    Question Unanswered: Change default short date format

    How do i change the default short date format in Windows thru VB code for my db applications?

    (Users can interactively change the default short date fromat by going thru Control Panel -> Regional Settings -> Date )

  2. #2
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    Lightbulb Format

    Format(field,format)


    Format(rsDate,"dd-mm-yyyy HH:NNS")

  3. #3
    Join Date
    Nov 2003
    Location
    India
    Posts
    10
    Thanks for replying.
    As i said in the thread opener, i need to change the default short date format of Windows and so format is simply a function for one time usage which will not work.

  4. #4
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    Thumbs down change user regional settings ????

    it's not normaly to change the settings of a user, he/she have set them for some reson.

    if you want to show them a date in your format use the format function

    or if they have to give you input, trap the input and change it to your format or use a MaskEditBox with your desired format

    But if you realy want to change it there must be some kind of API you can call (remember to reset them to his her setting, not every 1 uses the same format: USA: MM-DD-YYYY ; EUROPA : DD-MM-YYYY ; ACCESS : YYYY-MM-DD )

    some comment using general settings :
    When you enter data using locale-specific format in the Grid pane, the Query Designer automatically translates it to ANSI format in the SQL pane. For example, if your Regional Settings are set to Standard German, you can enter a date in the Grid pane in a format such as "31.12.96." However, the date will appear in the SQL pane in ANSI datetime format as { ts '1996-12-31 00:00:00' } If you enter data directly in the SQL pane, you must enter it in ANSI format.

  5. #5
    Join Date
    Nov 2003
    Location
    India
    Posts
    10

    Re: change user regional settings ????

    Originally posted by Marvels
    it's not normaly to change the settings of a user, he/she have set them for some reson.

    But if you realy want to change it there must be some kind of API you can call (remember to reset them to his her setting, not every 1 uses the same format: USA: MM-DD-YYYY ; EUROPA : DD-MM-YYYY ; ACCESS : YYYY-MM-DD )

    Thanks once again.

    I can assure u that there's a logical reason for changing the settings of the user.

    Can u please tell me the name of the API (i've very rarely used them before and so know little about them) and the syntax.

Posting Permissions

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