LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Collection of days/hours/minutes etc. to time stamp?

mshaske_0-1640195921341.png

How do I take a collection of these days/hours/minutes etc. to a time stamp? What would be the easiest way?

0 Kudos
Message 1 of 3
(1,206 Views)

LabVIEW Timestamps represent absolute time - ie representing a specific date and time. The .NET TimeSpan struct represents relative time - ie representing the amount of time that has elapsed from some (not specified) origin. Converting the latter to the former doesn't make sense unless you have an origin point in mind.

 

https://www.ni.com/en-nz/support/documentation/supplemental/08/labview-timestamp-overview.html 

https://docs.microsoft.com/en-us/dotnet/api/system.timespan?view=netframework-4.7.2 

 

Assuming you do have an origin point in mind, then it is helpful to know that you can create a TimeStamp (your origin) and then add a number of seconds to it represented by a double value. If you can convert your TImeSpan elements into a total number of seconds (including the fractional portion), then you can create a LabVIEW TimeStamp absolute time that represents your original Origin + TimeSpan relative difference.

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

something like this shall help

date time.png


CLD Using LabVIEW since 2013
0 Kudos
Message 3 of 3
(1,149 Views)