LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Newbie question: Replace an array element with a new value

I have a 2 dimensional string array where the second column of data contains dates. I want to change the date data from day month year to year month day. How can I do this?

0 Kudos
Message 1 of 11
(3,164 Views)

!0.png

 

Index out the column

Format to timestamp

format back to string

replace column


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 11
(3,153 Views)

Thank you. I was too general on the description of the date format

 

Current date field example: 05 Feb 2012

Replaced date field example: 2012 02 05

 

Does your example address this format?

0 Kudos
Message 3 of 11
(3,145 Views)

not exactly but a minor mod to the format specifiers would

 

!0.png

 

That does it


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 11
(3,131 Views)

Would you mind posting the vi, as the functions are not immediately familiar?

 

Thank you

0 Kudos
Message 5 of 11
(3,124 Views)

Check the edit above.  It took a minute


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 11
(3,119 Views)

Harry,

 

Jeff's picture is a code snippet.  Drag the picture to your desktop and then drag it into a VI.  Voila.

aputman
0 Kudos
Message 7 of 11
(3,105 Views)

That is cool. Thanks!!!

0 Kudos
Message 8 of 11
(3,101 Views)

@aputman wrote:

Harry,

 

Jeff's picture is a code snippet.  Drag the picture to your desktop and then drag it into a VI.  Voila.


If you look at the edit time in the post it makes more sense.  I posted- ran off to whip up a quick example (Couldn't remember the difference between %B and %b) and was delayed with the edit crossing Harry's post-  so there was no example when he read it the first time.

 

(These things sometimes just need to be explained to make any sense)


"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 11
(3,100 Views)

@Harry_Sundberg wrote:

That is cool. Thanks!!!


Welcome,  Next thing you know you'll be giving Kudos and marking solutionsSmiley Wink


"Should be" isn't "Is" -Jay
0 Kudos
Message 10 of 11
(3,094 Views)