LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert numbers 0 to 6 into Monday to Sunday

Solved!
Go to solution

Hi,

I created a 2D array and with an Index Array I am extracting information from each row, but instead of selecting rows 0 to 6 in the Front Panel,  I need to display the days of the week. Any ideas to help me please?

I am trying with a Format Value Function, but it is not working for me:

 

GeorgeDuncan_0-1587144152083.png

Thanks in advance for suggestions!

 

George

 

 

0 Kudos
Message 1 of 4
(1,982 Views)
Solution
Accepted by topic author GeorgeDuncan

I believe the %w code just takes a date/time and outputs the index (0-6) which is not what you want.

 

There may be a fancier way to do it, but I would just make a constant array of strings, where each string is the text for the day of the week and use the index you've already got to select one of those and output it.

 

mbsatch_0-1587147117670.png

 

Message 2 of 4
(1,951 Views)

An enum would work too.

Frozen_0-1587149664437.png

 

---------------------------------------------
Certified LabVIEW Developer (CLD)
There are two ways to tell somebody thanks: Kudos and Marked Solutions
Message 3 of 4
(1,931 Views)

Thanks a million, this worked perfect!!! 😀

0 Kudos
Message 4 of 4
(1,877 Views)