LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Compare Time and Date String

I would like to compare date and time from .txt file. How do i change string date and time to actual time? Is there any CVI command that perform time comparison?
0 Kudos
Message 1 of 2
(4,038 Views)
You could parse the string of date and time and conveniently fill the fields of a struct tm, then use mktime () to obtain calendar time and use difftime () to compute the difference. The result of this function is in seconds, so you may need to reformat it in case you want to show it in hh:mm:ss or other formats.


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(4,031 Views)