Date.Shortdate does not seem to work?!

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?

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

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

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

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.

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

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

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.

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

What version of Xojo are you using?

@
I’m using the latest version of Xojo.

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

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.

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!

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.

@
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.