Message Boards Message Boards

0
|
3386 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:
GROUPS:

How to select date's with data between two different values?

Posted 9 years ago

Hi All, It is seems a simple question but I am strugeling to select date's with data only between different values. Please see attached file. Example:

data2014 =
 {{{2014, 1, 1}, 58}, {{2014, 1, 2}, 29}, {{2014, 1, 3}, 
   67}, {{2014, 1, 4}, 31}, {{2014, 1, 5}, 72}, {{2014, 1, 6}, 
   40}, {{2014, 1, 7}, 25}, {{2014, 1, 8}, 70}, {{2014, 1, 9}, 
   31}, {{2014, 1, 10}, 14}, {{2014, 1, 11}, 96}, {{2014, 1, 12}, 
   44}, {{2014, 1, 13}, 75}, {{2014, 1, 14}, 75}, {{2014, 1, 15}, 
   42}, {{2014, 1, 16}, 59}, {{2014, 1, 17}, 80}, {{2014, 1, 18}, 
   58}, {{2014, 1, 19}, 7}, {{2014, 1, 20}, 70}, {{2014, 1, 21}, 
   55}, {{2014, 1, 22}, 23}, {{2014, 1, 23}, 73}, {{2014, 1, 24}, 
   78}, {{2014, 1, 25}, 20}}}

   Now I need the dates with values only between (from to) 20 and 50.


MapAt[QuantityMagnitude, 
Select[data2014, NumberQ[QuantityMagnitude[#[[2]]]] &], {All, 1, 2}] 

Please can you help ! Thanks...Jos

Attachments:
POSTED BY: Jos Klaps
2 Replies

Hi Bill,

Thanks for your reply and support. This is verry helpfull !

Cheers....Jos

POSTED BY: Jos Klaps
Posted 9 years ago

Thank you for the sample data notebook and for clearly showing what you want to extract. That was very helpful.

Select[data2014, 0<Last[#]<50&]
POSTED BY: Bill Simpson
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract