LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

To find the missing date in a month

Hi All,
 
I have to find the dates in a particular month for which there is no records in the database.
 
Ie,if in the month January there are only records on dates 2,28,29,30.
 
Then i have to some how find out the rest 27 days (that is missing in the database).
The date in the database is in the date time format.and in a particular date there may be many records.
 
Let the table contains two fields date and value.
 
I have to plot a monthly graph in which missing dates value should be plotted as 0 and dates present inthe database take the value of the particular date.
 
Is there any way to accomplish this?
 
thanks....
 
0 Kudos
Message 1 of 2
(2,267 Views)
How about initializing an array [0..31] of booleans to FALSE?

As you go thru each record, convert its date to a number 1..31.

Set the corresponding array element to TRUE.

When you're done, search the array for FALSE elements - the index of any FALSE elements is the data you're missing.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 2 of 2
(2,254 Views)