05-27-2013 11:18 PM - edited 05-27-2013 11:21 PM
Hello all,
I'm having a little problem here. I already have a text file with statistical data and I need to synchronize it with other data. For that, I want to put time stamps on each row of the data. Right now I have date/time in format 07/04/12 9:05 p
So you can see on the printscreen image what I'm trying to do but when I run the code it gives me an error 😞 Please, help me. I've been trying to look for mistakes but I cannot find any yet. Maybe you can see what I'm doing wrong?
Solved! Go to Solution.
05-27-2013 11:49 PM
it is your scan from string format constant...
05-27-2013 11:51 PM - edited 05-27-2013 11:51 PM
apoc, what should it be? From what I've seen it seems alright. Can you tell me specifically what is wrong with it?
05-27-2013 11:53 PM
Well I can see that the string formed is "06:08:00 P*07/04/12" (without quotes)...
-> shouldn't it be PM instead of P*...
-> And there should be space between PM and Date (07/04/12)
So if you try to parse "06:08:00 PM 07/04/12"... there is no error...!!
If at all you have any other error, you should post your VI along with the data file.... or much simply can you copy&paste the string input at "Scan from String" node...??
05-27-2013 11:59 PM
@moderator1983 wrote:
Well I can see that the string formed is "06:08:00 P*07/04/12" (without quotes)...
-> shouldn't it be PM instead of P*...-> And there should be space between PM and Date (07/04/12)
So if you try to parse "06:08:00 PM 07/04/12"... there is no error...!!
If at all you have any other error, you should post your VI along with the data file.... or much simply can you copy&paste the string input at "Scan from String" node...??
This is the probe result of the input string to "Scan from string" : 06:08:00 PM 07/04/12
The asterisk is there because Labview just shows the beginning of the string, I guess. I'm out of explanations for this one, thought I might find suggestions here.
05-28-2013 12:02 AM - edited 05-28-2013 12:03 AM
@DanaSh wrote:
This is the probe result of the input string to "Scan from string" : 06:08:00 PM 07/04/12
Can you send that probe's result alone...!! may be enclose it in Quotes or parentheses...!!
Because when I tried parsing "06:08:00 PM 07/04/12"... there was no error...!!
05-28-2013 12:10 AM
05-28-2013 12:19 AM
@moderator1983 wrote:
Can you send that probe's result alone...!! may be enclose it in Quotes or parentheses...!!
Because when I tried parsing "06:08:00 PM 07/04/12"... there was no error...!!
here you go
05-28-2013 12:27 AM
@moderator1983 wrote:
Check it here...!!
I'll try to run it on a different computer. Seems like it's not the problem with the program then
05-28-2013 12:28 AM
Cannot you copy and paste the string right here...!!
attaching screenshot will not help me getting the exact string...!!
And have you tried my code that I've attached in my previous post (as snippet)..??
or may be you cna copy the data from LabVIEW probe (#23)... and try running it in separate code.. and you should not get any error...!!!