Date.Shortdate does not seem to work?!

  1. 4 months ago

    H S

    Mar 12 Pre-Release Testers, Xojo Pro

    Dear all,

    I'm developing an application for mac and windows 10. I'm building it brick by brick so to say and now a simple line of code does not seem to work on windows 10. I think I'm overseeing something, but I can't figure it out what.

    I want to print the shortdate in a textarea. On mac this works, but on windows it gives me a blank space. When I use the example code for shortdate it also does not work.

    Example code:
    Dim d As New Date
    MsgBox(d.shortdate)

    I've checked the locale of my windows 10 machine and the short date is there how I want it to see in a textarea or a msgbox.

    Can someone help me?

  2. Dave S

    Mar 12 San Diego, California USA

    have you checked the Win10 System Preferences for how dates should be formatted?
    Perhaps on this particular machine the format is invalid (or blank)??? just an idea

  3. H S

    Mar 12 Pre-Release Testers, Xojo Pro
    Edited 4 months ago

    I've checked the preferences. see link to pictures.
    picture 1
    picture 2

    I'm having this issue on two windows 10 machines.

  4. Michel B

    Mar 12 Pre-Release Testers RubberViews.com
    Edited 4 months ago

    If you can reproduce it reliably file a bug report.

    To solve the immediate issue, I would roll my own method. It is not that difficult to do.

  5. H S

    Mar 12 Pre-Release Testers, Xojo Pro

    I will try to change locales and see what will happen. If it will not change I will file a bug report.

  6. Markus W

    Mar 12 Pre-Release Testers, Xojo Pro #JeSuisHuman Germany, Heidelb...

    What happens with LongDate?
    What happens if you actually set the date?

  7. H S

    Mar 12 Pre-Release Testers, Xojo Pro

    Longdate also does not work. I figured that out 2 minutes ago. There has to be some setting I miss in win10.

    If I set the date it will show the date with 00:00:00 time in a msgbox, but when I use ShortDate or Longdate both MsgBoxes are empty.

  8. Michel B

    Mar 12 Pre-Release Testers RubberViews.com
    Edited 4 months ago

    Have you tried both Date and Xojo.Core.Date ? The latter should not exhibit the same bug.
    http://developer.xojo.com/xojo-core-date

  9. Julian S

    Mar 12 Pre-Release Testers, Xojo Pro UK

    What version of Xojo are you using?

  10. H S

    Mar 12 Pre-Release Testers, Xojo Pro

    @Julian S
    I'm using the latest version of Xojo.

    @Michel B
    I will try it with Xojo.Core.Date tonight or tomorrow.

  11. Markus W

    Mar 12 Pre-Release Testers, Xojo Pro #JeSuisHuman Germany, Heidelb...

    And my usual trouble-shooting favorite: have you restartet the computer?

    Sometimes Xojo gets into a state where it behaves weirdly. Restarts usually fix that.

  12. Julian S

    Mar 13 Pre-Release Testers, Xojo Pro UK

    It looks like a bug, as soon as I set my date region to the same as yours (English (Netherlands)) it comes back with a blank format.

  13. Markus W

    Mar 13 Pre-Release Testers, Xojo Pro #JeSuisHuman Germany, Heidelb...

    @Julian S It looks like a bug, as soon as I set my date region to the same as yours (English (Netherlands)) it comes back with a blank format.

    Nicely spotted!

  14. Alberto D

    Mar 13 Pre-Release Testers, Xojo Pro

    @Julian S It looks like a bug, as soon as I set my date region to the same as yours (English (Netherlands)) it comes back with a blank format.

    I think I read a bug report about that some time ago, but I was not able to find it on Feedback. At that time I think it was verified.

  15. H S

    Mar 13 Pre-Release Testers, Xojo Pro

    @Julian S
    Thanks for verifying. Both of my Win10 machines have the same region so that would explain a lot.

    I will file a bug report tonight.

or Sign Up to reply!