[Tex/LaTex] Passing day, month and year to the macro

datetimemacros

I just wanted to ask, how to do something like this – I have my own macro, that needs custom date passed as arguments:

\newcommand{\introduction}[3]{
This is regarding your loan application that was on \formatdate{#1}{#2}{#3}.}

And then I use this macro in the text with custom day, month and year. But LaTeX shows me current date. So, what is wrong? Is it because the date isn't known in the preambule (and current date is used as default)?
Thank you for your hints.

Best Answer

Not sure how you are using this macro, but for me it produces the date that I specify in the parameters to the macro:

enter image description here

Code:

\documentclass{article}
\usepackage{datetime}

\newcommand{\introduction}[3]{%
This is regarding your loan application that was on \formatdate{#1}{#2}{#3}.}%

\begin{document}
\noindent
\introduction{04}{05}{1977}
\end{document}