# Query regarding usage of \date

Hi I am using Texmaker to create some documents. When I use \date{text} the text being any date, and then run the .tex file I don't see the date in the PDF file. It's just blank. Not sure why. Is there a specific package to use \date?

-

\date merely sets the date and doesn't print it, just like \title and \author also doesn't typeset anything. Actually, \date stores its value in \@date, which you can retrieve if you don't use \maketitle (since it acts in a self-destruct fashion, wiping out most of the title-related information after its usage). If you which to print it, you could define

\makeatletter
\newcommand{\printdate}{\@date}
\makeatother


in your preamble and use \printdate wherever you want to show the date specified through \date.

However, the best way to access the date and print it in various formats, is to use the isodate package. See Date format in LaTeX.

-

\date{} only sets the date but does not print it. The most common way of doing so is \maketitle

\documentclass{article}

\begin{document}

\date{24.12.2012}
\title{Some example}
\author{Uwe Ziegenhagen}

\maketitle

\end{document}


If you want to access the date (or author or title) outside the titlepage have a look at the titling package. It provides new commands such as \thedate.

BTW: TeXmaker is only the editor, it has nothing to do with LaTeX behind.

-