LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the AM/PM from CSV file

I wrote this code to take the Log Time from a CSV file and it utilizes arrays but the AM/PM from the excel file does not get incorporated to the Log Time after Labview retrieves the numbers. Can someone help? The results only return for example 11:30:45

0 Kudos
Message 1 of 6
(3,399 Views)

It will be easier with your CSV file.

0 Kudos
Message 2 of 6
(3,390 Views)

Here you go. I cannot format the csv file any differently

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

The "Log Time" is in 24-hour format.  There is no AM/PM to get.

0 Kudos
Message 4 of 6
(3,362 Views)

Your .CSV file Log Time is in 24 hour format

Open your .CSV file

Highlight the Log Time column 

Right click and select "Format Cells" from the popup menu

Then select Time

Accept or change to the "default" AM/PM time format at the top of the format list 

save your .CSV file

Run your program, it works.

========================
=== Engineer Ambiguously ===
========================
Message 5 of 6
(3,353 Views)

I think I am going to keep it as a 24 hour format. By any chance do you know how to convert a time string into a number in TestStand in order to compare two times using a If statement?

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