LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to read current date from day of the year?

Solved!
Go to solution

i want to set 30 days for endurance test for components testing application. user will be set current from 30days with out specify the end of the day.

 

i have seen the "Seconds To Date/Time.vi" on that i checked the day of the year. if i can use this day of the year i can add +30 to read 30th date.

Regards,
Balaji DP
0 Kudos
Message 1 of 5
(3,536 Views)

Barlaji,

 

Why not just have a final time of 60*60*24*30 + <time of test start>?  This will get you a final time that will be 30 days from the current time.

 

Cheers, Matt

0 Kudos
Message 2 of 5
(3,535 Views)

this test not only they run continuosly.... even they pause then resume the days count.......

Regards,
Balaji DP
0 Kudos
Message 3 of 5
(3,530 Views)

Why not start with a timer value of 60*60*24*30. Then, if the test is not paused, just subtract one from that value every second. If the test is paused, then don't subtract from that value. When the counter is zero your test is done.

0 Kudos
Message 4 of 5
(3,522 Views)
Solution
Accepted by topic author Balaji_DP

Balaji,

 

What I gave was the answer that you were originally looking for I believe.  You will not simply be able to read the date in a coherent way and then add 30.  You will have to either use the Get Date/time in Seconds function or some varaint thereof and then add the offset you desire (you could use the Get Date/Time String and grab the date directly, but converting this to numeric that will be meaningful in monitoring elapsed time will be considerably more difficult than what I just provided).  If you wish to pause the test, simply keep track of the amount of time the test is paused and extend the time by the time that amount.

 

Cheers, Matt

0 Kudos
Message 5 of 5
(3,521 Views)