06-15-2017 08:38 AM
I am getting the date from a CSV file which outputs the date in DD/MM/YYYY so it would be for example 06/05/2017 which is not the default that windows uses because windows shows a date format of 6/5/2017. I fixed this issue in Labview by having it search for the '0' and replace it with nothing using Search and Replace. I have two of these Search and Replace to get the 1st two zeros but not the last one. Now I am having the issue that the second '0' sometimes deletes the '0' in 2017 when the date becomes 06/15/2017. How can I make use of Search and Replace to just search for characters 3-5 or to make it stop before deleting the '0' in 2017.
I cannot change the date format from the CSV file because my program gets that data from a GUI and wish not to change the CSV.
Solved! Go to Solution.
06-15-2017 08:52 AM - edited 06-15-2017 08:54 AM
Hi guy99,
use ScanFromString with format "%d/%d/%d", then wire the 3 resulting integers to FormatIntoString using the very same format string!
This will remove leading zeros…
What's wrong with dates shown including those leading zeros?
06-15-2017 08:58 AM
Here is the part of the code I am taking about. A little confused on what your saying. As you can see, I had in a array and concatenate string for single string. Then it has the 06/15/2017 and i delete one string and the second one deletes the other '0' but in 2017. Dont mind the deletion of the " as I need that for a different reason. Why would I implement your solution into my code. I am a little confused. I want it to somehow not look into the 2017 ever.