This widget could not be displayed.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timestamp to numeric value

Hi

I cant get this to work

I want to take an timestamp and transform it into an numeric value

That wil say, taking a timestamp like 12:13:12 as timestamp and get it out the other way in numeric form as 12:13:12

Example that dosent work underneath

 

0 Kudos
Message 1 of 11
(4,460 Views)

12:13:12 is not a numeric format, so I don't quite understand what you are trying to convert it to. A simple DBL conversion will give you a numeric value that corresponds to the number of seconds since the LabVIEW epoch. 

 

Message 2 of 11
(4,447 Views)

Haven't you seen the function that is available in LV that gives you numeric value of Time cluster. You can covert a time stamp also using this

 

Time_BD.png

 

Time_FP.PNG

 

Good luck.

-----

The best solution is the one you find it by yourself
Message 3 of 11
(4,428 Views)

Thx for the tips

 

What i realy want is to transform the timestamt into a string puting it inside an channal in TDMS Excel format

0 Kudos
Message 4 of 11
(4,395 Views)

That makes no sense. There is either TDMS format or Excel format. For TDMS, you simply write the timestamp (Example - Write data (events)) or it will be part of a waveform data type.

0 Kudos
Message 5 of 11
(4,385 Views)

And,

 

Of course if you want Excel to handle it as time in its native time format.....use time to xl   Time to XL can be downloaded from here https://decibel.ni.com/content/docs/DOC-19689

anyone surprised I posted that again?


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 11
(4,381 Views)

I have an plugin so i can read the TDMS file in Excel format

0 Kudos
Message 7 of 11
(4,377 Views)

The plugin allows you to open TDMS files in Excel, but there is no such thing as a "TDMS file in Excel format". An Excel workbook and a TDMS file are two completely different things. Thus, it's not clear what it is that you want. If you are generating a TDMS file, then do what Dennis said.

0 Kudos
Message 8 of 11
(4,369 Views)

I think the answer to your question might be that the actual data (timestamps) are on the Excel tab (Worksheet) with the name that matches your channel name.  If you didn't name your channel, it will be labeled "Untitled".  The first page that opens just shows the "structure" of the content of your file, but not the data itself.  The latter will be on individual worksheets.

0 Kudos
Message 9 of 11
(4,361 Views)

Im generating a TDMS file with 1 colum of data and 1 colum with timestamp. When i open the TDMS file using Excel the timestamp colum contains only of  the value like .82345678 and not the string data like "11:12:01" i was storing inside the TDMS file.

0 Kudos
Message 10 of 11
(4,357 Views)