LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to get the time from a file recorded?

Solved!
Go to solution

Hi EduU,

 

correct! Smiley Wink

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 11 of 22
(1,623 Views)

Well GerdW,

 

I put the right time in the header 

but now I need to read this time, how I can read the time and put it in seconds??

 

Thanks for the help 

0 Kudos
Message 12 of 22
(1,609 Views)

Well GerdW, I made an example to maybe you can understand better

 

I make that code: string.JPG

 

And the result in Front panel is that: final string.JPG

 

Now I need take that time "14:46:01" and make it a number, How I can make it?

And the Identification, can be a lot of characters... 

 

I tryed String subset but I don't work, if you can attch an image with the solution

I will be pleasure!

 

Thanks 😃

0 Kudos
Message 13 of 22
(1,588 Views)

Hi EduU,

 

you will find a lot of threads on time string to timestamp conversion in this forum...

timestamp.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 14 of 22
(1,580 Views)

Hey GerdW, I tryed what you said but it wont work =x

 

In my string I have a text too, I made an example here I will attach an image to you take a look

 

Maybe I'm doing something wrong =x

 

block diagram.JPG

My output is showing only 0.

 

Because I have to use it at the concatenated string not only in data and time.

 

and after I have this output working, I need to take only the time and transform to a number of seconds... I know I can make it with unbundle cluster, but when I'm trying appears that I connect a time stamp to a cluster with 0 elements. How can I do it?

 

Thanks mate

Message Edited by EduU on 04-14-2010 07:51 AM
Message Edited by EduU on 04-14-2010 07:55 AM
0 Kudos
Message 15 of 22
(1,573 Views)
Solution
Accepted by EduU

Hi EduU,

 

when there is other text before your timestring you have to cut that first - how should ScanFromString know about that? SFS searches for a timestamp and only finds some "garbage" text...

 

You can

- use another scan format string (i.e. put another "%s " in front of your scan format string)

- strip the additional string before the ScanFromString function

Message Edited by GerdW on 04-14-2010 03:18 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 16 of 22
(1,563 Views)

Well, could you attach a image for me with a simple example?

 

I think I didn't understand =x

0 Kudos
Message 17 of 22
(1,555 Views)

Hi EduU,

 

try a format string of "%s %<%d-%m-%Y - %H:%M:%S>T"...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 18 of 22
(1,550 Views)

GerdW,

 

appears (too many format specifiers) I have to make one to one

 

I did something here and it works I will attach the image...

but I made it at labview 8.6

in labview 7.1 ( my program is in that version) I can't scan relative time... so didn't work...

I tryed extract the 3 numbers separated, but I don't know how to eliminated the ":"

 

works in labview 8.6:

 

time working.JPG

 

But in labview 7.1 I don't have this "%t" at scan string... so I tryed a different way:

 

time at 7.1.JPG

 

In output1 I get the hour, but when I try to get the minutes.... it don't appear because I have a ":" before the number... I have tryed the %s to took off the ":" but when I use %s the hole string dessapear. So I need a way to take off this ":"

 

Could you help me on that??

 

Well I understand now what you said.. I can extend the scan string to more than one variable... but I tryed what you said... and Time Stamp still don't work... but I need it to LabVIEW 7.1 so please help me with that =D

Message Edited by EduU on 04-14-2010 09:29 AM
0 Kudos
Message 19 of 22
(1,545 Views)

Hey GerdW,

 

I tryed here and works =D

I only have to put %f: at format string =D

 

Thanks for your help!

 

I'm really glad!

 

You got the solution!

0 Kudos
Message 20 of 22
(1,539 Views)