LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get all the dates from each day of a week

Solved!
Go to solution

I need a VI that gives me the dates of the week. I am using a Month Calender to look at a database and fill two different graphs with values from that database. One graph looks at the values of the specific day I choose in the Calender but the other graph looks at all the days of that week. To build that SQL query I need to have all the dates of that week.

I could build a function if I knew the first and last date of the week. Anyone know an easy way to do this?

0 Kudos
Message 1 of 4
(3,707 Views)
Solution
Accepted by topic author Peter_Y
Use the Second to Date/Time primitive to convert your day to a time cluster. One of the elements in the cluster is day of week which should allow you to easily find the end of the week (you can add 2 days and convert back or add 2 with the d unit to the original timestamp).

___________________
Try to take over the world!
Message 2 of 4
(3,702 Views)
Thanks that works. Tried to just change day of week but of course that didn't work because day of week, day of month and day for year has to be correct.
0 Kudos
Message 3 of 4
(3,687 Views)
Oh nice Labview understands that Day of year -1 is the last day of previous year. Saves me a lot of time.
0 Kudos
Message 4 of 4
(3,683 Views)