Re: [R] Latex: Date Format conversion

From: Felipe Carrillo <>
Date: Thu, 10 Jun 2010 09:37:59 -0700 (PDT)

My report is done every two weeks and is created automatically. I click a command button on an Excel form and it runs a .rnw script in R creating a latex dynamic report. Excel sends 15 days of data to R, eg: 6/1/10 to 6/15/10. Right above my report I usually write the range of the report manually, something like "Report from 6/1/10 - 6/15/10" so I want to see if latex can select that range of dates dynamically because my report dates are constantly changing. I would like latex to look at the beginning and last date of my report and fill out the dates on the fly. I can do this easily with the following:
Report from \Sexpr{report[1,1]} & - & \Sexpr{report[1,15]} and it prints the correct values:
Report from 6/1/10 - 6/15/10
But I want those values formatted like this: Report from June 01, 2010 - June 15, 2010 I am looking for a latex command to convert the dates, something like this pseudo-code: Report from \longdate\Sexpr{report[1,1]} & - & \longdate\Sexpr{report[1,15]} Where long date will be the format that converts 6/1/10 to June 01, 2010
Thanks for helping.

> 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).


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 mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu 10 Jun 2010 - 16:39:43 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 10 Jun 2010 - 17:30:29 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive