LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

scan from string does not recognize AM/PM flag

Solved!
Go to solution

Hi,

 

I am using Labview 8.6. I want to parse a time string, with an AM/PM flag inside, but the "scan form string" time format code

"%<%d/%m/%Y %I:%M:%S %p>T" does not recognize the AM/PM flag. The remaining string containes the AM/PM flag.

 

best regards,

Friedrich Vollink.

 

 

0 Kudos
Message 1 of 8
(4,114 Views)

Example with default values.

0 Kudos
Message 2 of 8
(4,107 Views)

I think Format string is wrong..it should be "%<%H:%M:%S%2u%m/%d/%y>T"

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 3 of 8
(4,102 Views)

It works now. I toggled AM/PM time format on my laptop (control panel/local settings).

 

Thanks for the reply.

 

Regards,

Friedrich Vollink 

0 Kudos
Message 4 of 8
(4,096 Views)
Solution
Accepted by FriedrichV

The solution is:

 

define the AM and PM symbols in the control panel\regional settings\time  Pffffffffffffffffffffffffffff

 

Regards,

Friedrich Völlink

Message 5 of 8
(4,069 Views)

I'm using LV2010 and the AM/PM flags are defined in the control panel/local settings, but I still have the same problem!

 

 

 

Format String:  %<%m/%d/%y %H:%M:%S%p >T

 

Input String:

 

05/06/11 02:15:56 PM

 

Output Time Stamp:

2:15:56.000 AM
5/6/2011

 

Remaining String:

PM

 

0 Kudos
Message 6 of 8
(3,956 Views)

Did you read the help for time format strings? You cannot use 'H' for 24 hour time and the am/pm flag.

Message 7 of 8
(3,944 Views)

Thanks, Missed that!

0 Kudos
Message 8 of 8
(3,926 Views)