Date is element of some period in MATLAB
1 view (last 30 days)
Show older comments
Hi
I have a question that bother me. If I have a date, lets say 10.2012, how can i check he is element of period beetwen 14.10.12 and 1.1.2013.
Thank you in advance
Nejc
0 Comments
Accepted Answer
Walter Roberson
on 4 Apr 2013
pstart = datenum('14.10.2012', 'dd.mm.yyyy');
pend = datenum('1.1.2013', 'dd.mm.yyyy');
testdate = datenum('5.10.2012', 'dd.mm.yyyy');
if testdate >= pstart & testdate < pend
disp('in testing range')
end
0 Comments
More Answers (0)
See Also
Categories
Find more on Time Series Objects in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!