echo "example" > sample_`date+%F`.txt
will yield something like sample_2008-02-29.txt. The man pages on date have more information.