in reply to Choosing the closest date...
Properly formatted dates (yyyy-mm-dd) can be alphabetically sorted. Just select the first one after sorting.
update: