LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

erratic date control / bug in LabVIEW?

System: LabVIEW 6.0.2, Windows 2000 or NT4, Norwegian or Danish regional settings (have not tested others).

I have an application (made and built in LabVIEW 6.0.2) where a numeric control with time format is used to select a date...This works fine on 90% of the PCs it is run on...however on some the numeric control has a will on its own...when you enter 10.05.2001 it changes its value to 05.10.2001...and reverse...if you enter 2002 it might change to 2020..11.03 might be changed to 01.03 etc. There is no code writing to a local of the control or anything like that ...the problem seems to be a bug with the control itself.

I have tried to figure out what could cause this...and it seems that if you choose the date format to be s
ystem date you can turn on the problem...This could make sense if the control did not accept too high month numbers in the day input and then to tried to guess the intended input switched the two around...but that is not the case...

Now - is there some regional option or other that can be adjusted to get rid of this...or do I have too build the application again with the control set to use custom format?
0 Kudos
Message 1 of 6
(2,408 Views)
When you set the date format to system date it will set the date to display in what ever format windows is set to. This can be set under regional settings in the windows control panel, there is a tab for date settings.

Different computers will have different settings depending on the user preference. If you want your program to display the same way no matter what computer it is on then you have to choose custom format.

Brian
0 Kudos
Message 2 of 6
(2,408 Views)
Sure, that was the intention - to have the date adapt to each users system settings...however it should still behave systematically...not change 03.10 to 10.03 etc etc...
0 Kudos
Message 3 of 6
(2,408 Views)
Sorry, I guess I didn't understand the problem correctly. It seems that if you enter the date in a format that is different then what LV is expecting then it tries to fit it the best it can. For example on my computer if I enter the year in 4 digits (2002) and its expecting 2 digits LV will just cut off the last two leaving 20 (obviously not what I wanted). I'm not sure why it would change a valid date that you typed in though, maybe you did find a bug. I would try to narrow the problem down by seeing if the problem is linked to certain regional settings that are set on the problem pc and not on the ones it works on. Sorry I can't be of more help.

Brian
0 Kudos
Message 4 of 6
(2,408 Views)
Hey, thanks for trying:-)

Regional options does not seem to have any effect on the problem.
0 Kudos
Message 5 of 6
(2,408 Views)
,

I would make the following suggestion: Display the current date and time, in the native format, so that the user can know exactly what format to use. You could also use an independent (set in stone) format, and also display the current date and time. This would eliminate these issues altogether.

Good luck
0 Kudos
Message 6 of 6
(2,408 Views)