locked
Date shows wrong on a different computer RRS feed

  • Question

  • I have a windows forms application that I wrote in VB express 2008.  when i debug / run the program on my desktop, everything works as intended.  but when the program runs on any other computer, ALL the date boxes seem to move the digits in the box 1 space to the left:

    example:

    my computer:   12/03/2009
    other comp:      20/32/009

    any thoughts on why this is?  I have checked the settings on both computers (display settings, font settings, desktop settings)  I've made both computers identical and still get the same result.

    and this just occurs with the dates, no other errors of any kind.
    Thursday, December 3, 2009 8:52 PM

Answers

  • I just looked at the setting for my PC, and it looks like mine would have this issue, if my assumption is correct.

    In XP Pro...Control Panel....Regional and Language Options [Regional tab]....press the Customize button, and look at the Short Date [Date tab] options. Are they different on those machines? Mine is set to use 1 digit for month and year.

    Why this would cause that is not clear to me, but...I wouldn't be surprised if that is your "issue".
    • Edited by jinzai Thursday, December 3, 2009 9:18 PM typos
    • Marked as answer by Jeff Shan Tuesday, December 8, 2009 6:52 AM
    Thursday, December 3, 2009 9:17 PM
  • Try to force your own formating of the date... here is some basic code of what I am talking about:

    txtDate.Text = Format(Date.Now, "MM/dd/yyyy")
    • Marked as answer by Jeff Shan Tuesday, December 8, 2009 6:52 AM
    Thursday, December 3, 2009 10:54 PM

All replies

  • I just looked at the setting for my PC, and it looks like mine would have this issue, if my assumption is correct.

    In XP Pro...Control Panel....Regional and Language Options [Regional tab]....press the Customize button, and look at the Short Date [Date tab] options. Are they different on those machines? Mine is set to use 1 digit for month and year.

    Why this would cause that is not clear to me, but...I wouldn't be surprised if that is your "issue".
    • Edited by jinzai Thursday, December 3, 2009 9:18 PM typos
    • Marked as answer by Jeff Shan Tuesday, December 8, 2009 6:52 AM
    Thursday, December 3, 2009 9:17 PM
  • Try to force your own formating of the date... here is some basic code of what I am talking about:

    txtDate.Text = Format(Date.Now, "MM/dd/yyyy")
    • Marked as answer by Jeff Shan Tuesday, December 8, 2009 6:52 AM
    Thursday, December 3, 2009 10:54 PM