I would like to have Biblatex print only the year of a publication in the bibliography. Currently it shows the year, month and day.
The "date" option (e.g. date=iso8601) can't do that.
In analogy to Disable month in biblatex bibliography? you can just disable the month and day fields with the commands
\AtEveryBibitem{\clearfield{month}}
\AtEveryBibitem{\clearfield{day}}
For a short moment there came to my mind that there could be a caveat with the urldate field that declares when a URL has been checked, but biblatex even takes care of this. The urldate is still printed as full date. Compare the MWE and its output below:
\begin{filecontents}{test.bib}
@BOOK{test,
author= {A. Author},
title = {A Title for a Book},
date = {2012-10-08}
},
@ONLINE{test2,
author = {A. Author},
title = {Some title},
url = {http://example.com},
urldate = {2013-01-08}
}
\end{filecontents}
\documentclass{article}
\usepackage{biblatex}
\addbibresource{test.bib}
\AtEveryBibitem{\clearfield{month}}
\AtEveryBibitem{\clearfield{day}}
\begin{document}
\nocite{*}
\printbibliography
\end{document}

Is this what you intend to do? If not, please provide a MWE to work with.
The question and answer @benedikt-bauer linked to has since been updated with a new answer which contains a nicer solution:
https://tex.stackexchange.com/a/346281/181287
The
biblatexpackage optiondate=yearshould also work.One may also need
labeldate=yearas well; oralldates=yearand then something likeurldate=short
Which should be valid for biblatex version 2.8 (2013) and higher.
Updates: For clarity, here are the relevant (shortened) parts of the manual:
date=year,short,long,terse,comp,ymd,isodefault:comp
This option controls the basic format of printed date specifications.
<datetype>date=year,short,long,terse,comp,ymd,isodefault:comp
Similar to thedateoption but controls the format of the<datetype>datefield in the datamodel.
alldates=year,short,long,terse,comp,iso
Sets the option for all dates in the datamodel to the same value. The date fields in the default data model aredate,origdate,eventdateandurldate.
Full manual with more details and explanations of the possible options can be found here: http://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/biblatex.pdf
year you should only see the year, the day and month should not be shown. If that is not the case for you, I suggest you ask a new question with a full example document that shows what you are doing and how it doesn't work for you (MWE: https://tex.meta.stackexchange.com/q/228/35864).
– moewe
Jan 07 '20 at 18:02
labeldate having been renamed to labeldateparts. The situation is a bit complicated. And for a while now labeldate is the correct option for this job. What is now the option labeldateparts used to be called labeldate once. Back then an equivalent to labeldate (as it is now) did not exists. When such an option was implemented, the old option needed to be renamed for consistency with other ...date options. ...
– moewe
Jan 08 '20 at 06:55
labeldate was renamed to labeldateparts. But that was the old labeldate, not the one you use and explain in the question.
– moewe
Jan 08 '20 at 06:55
\documentclass{...}and ending with\end{document}. – Benedikt Bauer Jan 08 '13 at 11:42date=iso8601can't do it, butdate=yearseems to work fine for me. That option might be relatively new. – Rob Kennedy Jun 06 '14 at 15:08