If the dates are listed chronologically like your sample,

=INDEX(B5:B12,MATCH(TRUE,INDEX(A5:A12=A17,0),0))

copied down

otherwise:

=MIN(IF($A$5:$A$12=A17,$B$5:$B$12))

confirmed with CTRL+SHIFT+ENTER not just ENTER and copied down.