LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

time/date string to timestamp

Solved!
Go to solution

@NitzZ wrote:

Hi dan_u,

 

I didn't get a sample data from him, so i generated it using a "get time stamp" function and then tried to run it. It was running fine. There was nothing wrong in the code. But i had passed the value as Time in the first column and Date in the second. So the values which were coming in the output were wrong. Don't know why, i got this feeling that even he must be getting the same error and posted my previous post.. Hope you wont mind..To be honest, I was a bit careless while sending it.Smiley Happy


Warm Regards,

Nitzz 


Hi Nitzz, no offense, I was just curious how you figured this was the problem. You must have had some more information Smiley Wink

Message 11 of 27
(3,940 Views)

I can't save back to LV7, so here's an image:

DT-Str2.png

Message 12 of 27
(3,935 Views)

hi dan n yggr,

 

Still not successful in getting solution. Dan i tried ur solution also but, no results..... i think there is some bug in scan from string tool in labview7.0. find the attched image and vi where the big circle is the area of error. Is there any other thing i need to set in scan from string tool bcoz wen i try to connect timestamp array the red colour circle area does'nt show the timestamp format icon as it is present in ur case.

 

Can anyone Plz........ try this in Labview7.0, as now i want to conclude whether its a labview7.0 problem or not so i can move further and try some other solution.

 

other solutions for converting time/date string to timestamp are always welcome.

 

Thanks n Regards,

Ratna

Download All
0 Kudos
Message 13 of 27
(3,924 Views)

I segguest you check if format string in labview 7.0 accept the same syntax since your vi works here in Labview 2010. Maybe that can be the problem ?

0 Kudos
Message 14 of 27
(3,916 Views)

It's strange, it seems you have a timestamp indicator there, but according to this document

"LabVIEW 7.0 or earlier used a 64-bit double (DBL) to represent time".

So I guess that's the reason. So you have to use functions to convert the strings into a DBL representing the time. There should be functions for that in LV7.0.

 

0 Kudos
Message 15 of 27
(3,913 Views)

Hi dan n yggr,

 

I tried to use format string but that is also giving the same error. Also i tried to convert string date/time to DBL but the Scan from String tool gives error as too many format specifiers and contains unwired or bad terminal.  

 

So i m totally blank how to convert string date/time to timestamp as i badly need this to happen by any how???Smiley Sad

 

 

 

Regards,

Ratna

 

 

0 Kudos
Message 16 of 27
(3,880 Views)

Hi vijtin,

 

(as requested here) I would do it like this:

check.png

(Sorry, but I cannot convert back to LV7.0!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 17 of 27
(3,867 Views)

Hey gred,

 

This is the problem i m facing, look at the attached image. Scan from string tool doesn't accept the timestamp constant, its giving error as the type of sink is void. Also its giving me the list of errors as too many format specifiers.

So to avoid all this problems i tried to convert string date/time into DBL and then DBL to timestamp  but that is also not giving me any results. After so much exercises i m feeling that there is some bug in Scan from string tool in LABVIEW 7.0 version.

 

Do u have any other suggestion to convert string to timestamp bcoz its very difficult for us to move further in our project 

 

Regards,

John

0 Kudos
Message 18 of 27
(3,858 Views)

Hi vijtin,

 

you always have the right to convert "manually":

check.png

"i m feeling that there is some bug in Scan from string tool in LABVIEW 7.0 version"

Well, now we are at LV10SP1 (and LV11 is shining at the horizon) - and the bug seems to be removed since LV8...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 19 of 27
(3,852 Views)
Solution
Accepted by vijtin

Hi Gred W,

 

I tried ur solution and its working perfectly fine. Thanks a lot for ur immense help and supportSmiley Happy 

Also i will tell my higher authority to upgrade the LV version.

 

 

Thanks a lot n Regards,

John

0 Kudos
Message 20 of 27
(3,825 Views)