<div dir="ltr"><div><div><div><div>I wanted to add a time-stamp to a document<br></div>and found that \time contains the number of minutes since midnight.<br><br></div>The TeX Reference Manual, by David Bausum<br></div>contains a function to format time to civilian time<br></div><div><br><span style="font-family:monospace,monospace">%%  name: \texmf-local\tex\latex\local\format-time-am-pm.sty<br>%%description: format time as minutes since midnight<br>%%             to hh:mm am|pm<br>%%    purpose: provide time-stamp<br>%% usage:<br>%\usepackage{format-time-am-pm}<br>%date-time-stamp: \today, \timeAMPM{\the\time}<br>%%source: TeX Reference Manual, by David Bausum<br>%%        time, civilian, pg 290:291<br>%%        for military time see ifnum, pg 144<br>\def\timeAMPM#1% expected value=\the\time<br>{{\count20=#1                   <br>  \count22=\count20<br>  \divide  \count20 by  60      <br>  \count21=\count20<br>  \multiply\count21 by -60      <br>  \advance \count22 by \count21 <br>  \ifnum\count20<12\def\textAmPm{ am}<br>     \else         \def\textAmPm{ pm}<br>     \fi<br>  \ifnum\count20=0              <br>        \count20=12             <br>     \fi<br>  \ifnum\count20>12             <br>     \advance\count20 by -12    <br>     \fi<br>  \the\count20:%                <br>  \ifnum\count22<10 0\fi        <br>  \the\count22\textAmPm         <br>}}%end.timeAMPM<br></span><br></div><div>Ron Fehd  Atlanta GA<br></div></div>