LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

date/time string function : indication of after or before

Dear all,

 

I am trying to do an application which its role is to disable a boolean control after a specific date.

This specific date is chosen by the user in a string control.

 

For ex. the user enter the date 01.01.2015, and the application should disable the boolean control 1 year after so at 01.01.2016 (to do so, the application should always running ...)

 

Could you please suggest me an easy way to do that?

 

Of course I know that I can exract the day,month,year of my string and then convert then to numbers. But its quite difficult. I am searching for an easy way ! 🙂

 

Thank you very much

0 Kudos
Message 1 of 3
(2,969 Views)

Hi joobin,

 

some simple pseudocode:

 

IF timestamp1 >= timestamp2 THEN
  disable(boolean control)
ENDIF

What's the problem in comparing two timestamps?

 

This specific date is chosen by the user in a string control.

Why do you use a string control at all? Why not use a timestamp control, formatted to only show the date?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(2,963 Views)

Ah yes!!

 

In fact I did not know that we can use Timemap control.

Of cours it will be much easier to use that. 

That is all I needed !

 

Thank you very much.

0 Kudos
Message 3 of 3
(2,954 Views)