From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
06-15-2018 12:09 AM
Hello all ,
Two Different time values in string format to be subtracted. Result to be displayed as a string
time 3 = time 2 - time 1
need your guidance and tips
06-15-2018 12:15 AM
Can you be specific what is your time format in string ? e.g 10:43:16
06-15-2018 12:23 AM
Essentially you will use Scan From String to convert your time strings to Timestamps, then subtract the values (you may need to convert to DBL first), then you can format the resulting DBL value to a string using Format Into String. The LabVIEW help has info on the format codes for Timestamps:
http://zone.ni.com/reference/en-XX/help/371361R-01/glang/codes_for_time_format_str/
06-15-2018 12:32 AM
Hi kartik ,
time format i needed was hours and minutes . E.G : 18:43 - 12:31
06-15-2018 12:45 AM
Dear willcan
I guess this vi will help you.
06-15-2018 06:23 AM - edited 06-15-2018 06:23 AM
@kartiknattar wrote:
I guess this vi will help you.
Your minutes are actually show the number of seconds after the hour. You need another Quotient & Remainder to divide by 60.
OR
You can eliminate a lot of that code by just using the Format Date/Time String.
06-15-2018 04:01 PM - edited 06-15-2018 04:02 PM
When I come across a solution to something, I try to make it generic.
Drop the .xnode file onto your BD.
Right-click (or click with the Operate tool) and you can change the mode and the string format.