03-28-2013 01:02 PM - edited 03-28-2013 01:02 PM
You've got case structures,
you've got select statements.
Either one will behave like an "if statement"
03-28-2013 01:07 PM
Yes - there is the case structure, and the select function. But this seems like a purely mathematical operation, I'm not sure an if is necessary. You still haven't uploaded any code to show us what you've tried.
Timestamps in LabVIEW are represented as a number of seconds since some absolute date. You can convert the birth date into that format (using Date/Time to Seconds). Subtract from the current date, divide by the number of seconds in a year, round appropriately. If you want to be really precise about it you'll need to deal with leap years, but I'd guess it's sufficient to approximate it by adding one quarter of a day to the number of seconds in a year.
03-28-2013 01:11 PM
Heres another approach i took...not working
03-28-2013 01:11 PM
My thinking was along the lines as nathand. Subtract time stamps and use the Quotient and Remainder to divide by the number of seconds in a year. The quotient will be the age in years.
03-28-2013 01:15 PM
I'm not sure where you pulled the Build Cluster Array from. That function has nothing to due with your problem. Look in the Timing palette and find the Date/Time to Seconds function. Right-click on the date/time rec input and create a constant. Delete the wire. Now use Bundle By Name to replace the Year, Day, and Month in the cluster. Wire the new cluster into the Date/Time to Seconds function. This will give you a proper time stamp.
03-28-2013 01:16 PM
You might want to spend some time going through LabVIEW basics and tutorials. Why did you pick "Build Cluster Array"?
Start with Date/Time to Seconds, as I suggested in a previous post. Create a constant, or a control, for the Data/Time Rec input.
03-28-2013 01:33 PM
Not sure if this is what u had in mind
03-28-2013 01:41 PM
Right idea, but why are you bundling month, day and year into the "fractional second" element instead of the month, day, and year elements?
03-28-2013 01:51 PM
I see the inputs now...but if you run my VI, it is still not working properly. I know I'm missing something. I appreciate your patience. I've only been using Labview for a few days.
03-28-2013 01:52 PM
sorry...here it is