06-23-2015 11:13 AM - edited 06-23-2015 11:14 AM
Kevin90 wrote:
how do I get month of year? is there any vi to get that?
All you need to do is expand your Unbundle By Name and have the second output be the Month.
06-24-2015 03:29 AM
When I take the 'month' it's only loading the actual month, but not the past months of this year. With 'day of year' it 's not working. Then I have following problem:
- month april only calculate the values from 1.4 - 28.4
- month may calculate 29.4 - 30.4 + 2.5 - 28.5
- month june: 29.5 - 31.5 + 1.6 - 28.6
06-24-2015 06:57 AM
If you have special criteria based on the month, then you unbundle just the month value and wire that to the selection tunnel on a case structure. You can then do whatever special code you need inside of that case structure.
06-24-2015 08:43 AM
It's not working by unbundle only the month. Then it's only loading the current month.
I just need something like 'month of year'
06-24-2015 09:24 AM
The VI you posted did not include any data. What is the format you use for the information in Date? Please give a specific example of what you enter in Data and the result you expect in the indicators.
Lynn
06-24-2015 09:54 AM - edited 06-24-2015 09:55 AM
The input date is the current date (Array with year, month and day).
on the attached image:
- left: data in the csv: top(december), bottom(january)
- right: the expected data for june, may and april (top to bottom)
06-24-2015 11:13 AM
@Kevin90 wrote:
When I take the 'month' it's only loading the actual month, but not the past months of this year. With 'day of year' it 's not working. Then I have following problem:
- month april only calculate the values from 1.4 - 28.4
- month may calculate 29.4 - 30.4 + 2.5 - 28.5
- month june: 29.5 - 31.5 + 1.6 - 28.6
What does all of htis mean? What are those numbers you are adding and subtracting?
The VI you attached is only showing day of year in the Unbundle. It doesn't show where you tried to access the month and day.
06-24-2015 11:19 AM
Kevin90 wrote:
I just need something like 'month of year'
And what would you expect from "Month of Year". April would be 4, right? Isn't that what you get from Month?
06-24-2015 11:35 AM
With 'month', I only get the current month (July), the past months aren't loaded into the csv file.
06-24-2015 11:58 AM
@Kevin90 wrote:
With 'month', I only get the current month (July), the past months aren't loaded into the csv file.
You are making even less sense to me. That cluster is only a single value based on the Timestamp that was passed into it. So if you want the month of every item in the CSV, you need to load those timestamps into an array and use a FOR loop to get all of the months.