[R] Latex: Date Format conversion

Marc Schwartz marc_schwartz at me.com
Thu Jun 10 17:40:16 CEST 2010


On Jun 10, 2010, at 10:21 AM, Felipe Carrillo wrote:

> Hi:
> Can't find a way to convert from shortDate to LongDate format. I got:
> 3/10/10 that I want to convert to March 10, 2010. I am using:
> 
> \documentclass[11pt]{article}
> \usepackage{longtable,verbatim}
> \usepackage{ctable}
> \usepackage{datetime}
> \title{my title}
> \begin{document}
>   % Convert date
> \mmmmddyyyydate\3/10/10
> end{document} 
> 
> My report is changing every two weeks so I will eventually 
> use \Sexpr{report[1,1]} to grab the date from column 1, row 1
> of a table named "report" but right now my report has the date
> formated as described above (3/10/10).

Felipe,

Do you want the report to be dated for the day that it is processed by latex?

If so, just use:

  \today

to generate the current date at run time in the long format that you have above.

HTH,

Marc Schwartz



More information about the R-help mailing list