# Adding numbers to the theorem in Beamer

How can I add numbers to the theorems in beamer like Theorem 0.1 or 1.1? When I tried I just got Theorem 1 instead of Theorem 0.1, please help me.

This shows how to number theorem within section.

\documentclass{beamer}
\setbeamertemplate{theorems}[numbered]
\counterwithin{theorem}{section}

\begin{document}
\section{title}
\begin{frame}
\begin{theorem}
content
\end{theorem}
\begin{theorem}
content
\end{theorem}
\end{frame}

\section{title}
\begin{frame}
\begin{theorem}
content
\end{theorem}
\begin{theorem}
content
\end{theorem}
\end{frame}
\end{document}