Feedback on NI Community

cancel
Showing results for 
Search instead for 
Did you mean: 

Get Date/Time String to Array

Solved!
Go to solution

Hi,

 

I can't seem to solve this problem alone dispite my many attempts.

 

I used the function Get Date/Time String to retrieve the current Date and Time off the PC. The vi attached complishes this without a problem.

 

My problem is I would like to take each element in the string

 

i.e: Hour Min Sec and have them then an array. So the array would like look like this [1]Hour [2]Min [3]Sec.

 

I can not accomplish this. I am not sure how this would work, would I have to search for a specific portion of the string then have a counter increment to the next element I would like in the array?

0 Kudos
Message 1 of 5
(6,739 Views)

This board is for Feedback with issues about the NI forums themselves.

 

You want to post your question in the LabVIEW board.

 

Also, your VI isn't really doing anything.  Please try to do a little more with your VI so we can see where you are having a problem.  It sounds like you want a combination of parsing the string using the appropriate string functions and Build Array.

0 Kudos
Message 2 of 5
(6,737 Views)
Sorry must have clicked on the wrong section. My apologies.
0 Kudos
Message 3 of 5
(6,734 Views)
Solution
Accepted by topic author MrSafe

Here are a few possibilities. The upper one has the advantage that it uses a 24 hour clock, the lower two currently lose AM/PM info.

 

We really need more information on what you really want.

 

Message Edited by altenbach on 10-06-2009 07:22 PM
Message 4 of 5
(6,731 Views)

altenbach wrote:

Here are a few possibilities. The upper one has the advantage that it uses a 24 hour clock, the lower two currently lose AM/PM info.

 

We really need more information on what you really want.

 

Message Edited by altenbach on 10-06-2009 07:22 PM

That is exactly what I wanted. I wanted to be able to break up the Hour Minute and Seconds up into individual elements.

 

I tried the unbundled function before however, I was prompted with the messege "output does not match the input". I will give it another go. I will also try to move this thread some how to the appropriate  section.

 

Thank You.

0 Kudos
Message 5 of 5
(6,728 Views)