LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Scan from String, error 1 beim Zeitstempel lesen, formatstring ok

Hi@all,

i've some problems reading a timestamp with the "Scan from String"-function. I'm always getting error 1, an input parameter is invalid.

 

My formatstring looks like this: %<%d %b %H:%M:%S>T, so i have an absolute Timecontainer

 

My String to read from is this one: 04 Dec 14:30:18

 

There should be no problem reading this and display it in a Timestamp-Indicator

 

I'm using LabView 2009 Student Edition.

 

VI.PNG

 

Can anyone help me?

 

Thanks

0 Kudos
Message 1 of 6
(3,183 Views)
I didn't see anything wrong with the format string so I just plopped down a Scan From String on a diagram with your values, and I don't get the error. Of course, I didn't have a Greedy Loop. Do you get the error if you change the input string?
Message 2 of 6
(3,172 Views)

Wow, if I change the month in my String into "Dez" then I get no error. The Error is the word "Dec". I use a german Version of Windows XP, but an english Version of Labview 2009

 

Do you know how to tell Labview to use its own english monthnames and not this from my operating sys?

 

 

0 Kudos
Message 3 of 6
(3,167 Views)

I may be wrong, but I don't think you can do that with LabVIEW. Unlike other NI products, NI is not multilingual. Can you not simple get the German version? Did you buy this yourself, or did you get it through a university site license? If it's the latter would they not have the German version?

 

You could also change the Regional Settings in XP.

Message Edited by smercurio_fc on 12-04-2009 12:27 PM
0 Kudos
Message 4 of 6
(3,158 Views)

Perhaps you can do a search and replace on the string to replace Dec with Dez (or vice versa as the case may be).  If you create an array of strings for the English abbreviations, and an array of strings for the German abbreviations, you can do this in a For Loop so that any other months that might have different abbreviations can be converted.

0 Kudos
Message 5 of 6
(3,144 Views)

From LabVIEW help:

 

This format, including the punctuation, changes based on the regional settings of the computer. The time changes based on the configured time zone for the computer.

 

Setting your regional Settings to Spain or Italy you would need to have Dic instead of Dez.

If you need to process absolut timestamps always use the ISO notation, normally YYYY-MM-DDTHH:mm:ss.

Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 6 of 6
(3,128 Views)