I have a Datetime array (size: 1x1200) in the form of: 'dd-MMM-uuuu HH:mm:ss'
This array is allready orgenized by date & time from oldest sample to newer sample. I.e. Date(1,1) = oldest sample ; Date(1,1200) = Current time/day.
The sampling process is done randomaly. Thus, on a given date I could have a few samples (on differant hours of the day..) or none at all.
I have 2 user inputs: DateStart and DateEnd. Both are text inputs in the form of "dd/MM/uu".
I need to check which samples occured between DateStart to DateEnd (Including those days). DateStart and DateEnd can be the same date.
I tried searching for the specific dates but beacuse my array also shows the time (and I input date only) I get zero results...
So, I tried sorting it by logocal operators:
Smp1 = Date > DateCheckEnd;
Smp2 = Date < DateCheckStart;
SmpTotal = ~(Smp1 | Smp2 )
But this does not work well becuase the dates for DateCheckEnd are not being included.
I'm guessing that my input without hours defults to '22-Apr-2020 00:00:00' and so all the later samples that date being excluded.
I tried by changing to: Date.Format = 'dd-MMM-uuuu'
But this keeps the data of the time. and thus, still does not work.
Any suggestions how to resolve this?