CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Date Formats

  1. #1
    Join Date
    Jul 2002
    Posts
    38

    Question Date Formats

    Dear all,

    I have just noticed that VB does Date formats in a weird way.

    Instead of having "DD/MM/YYYY", it does "MM/DD/YYYY" in short date.

    why is that?

    Is there a way to set the format back to "DD/MM/YYYY"?

    Or even perhaps "DD/MM/YY"?

    Thanks.

    Woobi.

  2. #2
    Join Date
    Sep 2000
    Posts
    77
    It's because the settings for short date in your comp must be in the format 'MM/DD/YYYY'
    You can change it from Control Panel-> Regional Options.

    However with the default settings it should work absolutely fine

    for example

    dim d as Date
    d = "27/08/2002"

    doesn't give any error, it stores the date in the format specified in the above settings, but if you display, it appears as "08/27/2002".

    Hope this helps.

    -kiran.

  3. #3
    Join Date
    Aug 2002
    Location
    Lucknow
    Posts
    129

    Cool Reply

    Hi,

    - Check ur system setting for date.
    - use 'FORMAT()' function to mainuplate date formats.

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

Featured