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:

 perl -e ' print ${ [ sort ( split ( ";" => "2003-12-17;2003-12-09;2003-04-03" )) ] }[0] '