Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
1  
Welcome to TeX.SE. It is always best to compose a fully compilable MWE that illustrates the problem including the \documentclass and the appropriate packages so that those trying to help don't have to recreate it. This will also serve as a test case and ensure that the solution actually works for you. –  Peter Grill Jun 9 '12 at 19:14
add comment

1 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}
share|improve this answer
    
Yeah, I just created another file and it works. So, the mistake have to be in another place. I guess this could be the problem: \newdateformat{todaydate}{% \ordinal{DAY} \monthname[\THEMONTH] \THEYEAR} \todaydate –  Pan Inkognito Jun 9 '12 at 19:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.