Showing results for 
Search instead for 
Did you mean: 

Can't enter a time in numeric control

Go to solution

This happened to me all of a sudden.  I am not able to enter a time in a numeric control.  see attached.


When I enter a time it just defaults back to 0


Any help would be appreciated



Dan Shangraw, P.E.


0 Kudos
Message 1 of 10

Works fine for me.  I wrapped a loop around your control and connected an indicator to check it.  No problem.


Did you change any attributes?  Coerce maybe???  Right-click it and check...

LabVIEW 8.5.1 - 2019 Pro Dev
0 Kudos
Message 2 of 10

What time are you entering?  It seems to work fine for me.

There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 10

Here is a video.



Dan Shangraw, P.E.


0 Kudos
Message 4 of 10

I checked the coercion.  I don't have that enabled.


Very strange 

Dan Shangraw, P.E.


0 Kudos
Message 5 of 10

You have some weird data entry limits set (Max=Min). Does it work better if you go back to defaults?




LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 6 of 10

I deleted my control and created a new one and that fixed the problem.  Weird...


I can't enter 7 for the hours if the minutes are 0 though.  I tried setting the data entry limits to default and still the weird behavior.



Dan Shangraw, P.E.


0 Kudos
Message 7 of 10

If I use a numeric control instead of a time stamp control I can get it to work right.  I can enter a 7 for the hour if the minutes are 0.


Very strange behavior

Dan Shangraw, P.E.


0 Kudos
Message 8 of 10
Accepted by ASTDan

Remember that the time stamp control is not just for time, but for time/date.  So even though you might enter something like 3:00 pm,  that is 3:00 pm on a particular date that is not shown with your display settings.  If I show the date and enter 3:00pm it is 3 pm on 12/31/1903.


Which time zone are you in?  Are you eastern?  I found the same issue.  And 7 pm would be a special time/date in the eastern timezone because 7pm 12/31/1903 is time 0 which is midnight UTC for 1/1/1904, the epoch of the LabVIEW time system.


I also think I remember some issues, (bugs?) in LabVIEW related to entering some times at the epoch.


Remember, you can also set a double numeric control or indicator to display a value in the format of time.  I think that may be a better way to handle a time that you don't want to have a date associated with it like here where "Time to Read" file means, hey I want to read it 7pm every day.  You've got to do the code to handle it, but you've got to deal with it also with a timestamp control to distinguish between 7pm yesterday, 7 pm today, 7 pm tomorrow, and 7pm on 12/31/1903.


EDIT:  I did a little searching to see if I could find a thread that I think exists suggesting a bug.  Haven't found that, but found this which talks about the special case of 0 for a timestamp.  Basically a hard 0 is a special time that LabVIEW displays like an empty timestamp display rather than the data that is associated with 0, the epoch of midnight 1/1/1904 GMT.



Message 9 of 10

Thank you for that great explanation!

Dan Shangraw, P.E.


0 Kudos
Message 10 of 10