I'm working on making a simple tool to generate burn down reports/track task progress; this is my first foray into more complicated table manipulation so there's probably something pretty basic I'm not understanding. Hopefully someone wiser can set me straight :-)

I can create a new table and get today's date into it. It displays correctly when typeset (albeit duplicated and with extra commas). When I output that table to a file (output.dat), what is stored isn't the date, but \today. That's likely due to using create col/set.

My guess is that the "save" functionality isn't applying any typesetting to the data, so what I actually want is to store the YYYY-MM-DD date string to the table instead of \today. I've tried multiple methods of storing today's date into the table (based on the pgfkeys/pgfplotstable documentation), but am evidently going about it the wrong way.

What's the proper way to get this to format as a date when saving to an output file? Any assistance would be appreciated!

Here's my MWE:




    The current date is: \today

        create on use/Date/.style={create col/set={\today}, date type={\year-\month-\day}},%

    \pgfplotstabletypeset[columns/Date/.style={string type}]{\datestable}

        col sep=comma,%
        columns/Date/.style={string type},%


Contents of output.dat:

\today ,
\today ,
  • I ended up resolving my issue using – TexItUp May 23 '16 at 16:53

I ended up resolving my problem by using

    create on use/Date/.style={create col/set/.expanded={{\isodate}}, date type},

This allows the set value to be expanded prior to storage.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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