How can I convert numbers given as strings to "real" numbers? Consider the following MWE:
\documentclass{article}
\usepackage{datenumber}
\usepackage{xstring}
\begin{document}
\newcommand{\tag}{\StrBefore{01.01.2000}{.}}
%\setdatenumber{2000}{10}{\tag}
\setdatenumber{2000}{10}{10}
\tag \\
\datedate
\end{document}
Here, \tag
is set to 01
as can be seen in the output. But if I use the line \setdatenumber{2000}{10}{\tag}
I get the error "missing number, treated as zero". How can I avoid this? None of the other "Convert string to number" I found questions seem to be of help here.