From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timestamp array range searching

Solved!
Go to solution

Hi,

 

I have an array of timestamp (dd/mm/yyyy) which would like to search for range given.

It seem not working with "in range and coerce" function use for start date as not included into in range indicator (refer to vi attach).

Any suggestion on this??

 

Thanks,

Simon

0 Kudos
Message 1 of 3
(2,001 Views)
Solution
Accepted by topic author SimonChin

What you have looks okay to me.

 

I fixed it to month-day-year to make it more readable.

I also added the time and made sure seconds showed lots of decimal places in case there were small deviations in the floating point number.

 

Two things could be happening.

1.  You are only showing the date.  But if the time in your array is different than the time in your numbers to compare, the two values will look equal, but the comparison would fail because the time is perhaps hours, minutes, or seconds later than you think.  I see your elements are generally 7 pm, but the last one 8 pm.  Your timestamps you are comparing to are 1:04:11 am.

 

2.  Your comparison mode does not include the upper limit.  See where the diamond is hollow?  So you can right click on that and select Include upper limit.

 

Message 2 of 3
(1,993 Views)

RavensFan,

 

Thanks to point out.

Basically, the files save daily. 

I attach with my working vi for reference.

 

-Simon

0 Kudos
Message 3 of 3
(1,939 Views)