You have a list of pairs {date, value}, so if you are Transpose , you will have a list of two lists - the first list of dates, and the second - a list of corresponding values. You can then take the Differences values, Prepend 0, and then transpose again to return to the list of pairs.
In code
data = {{{1971,1,31,0,0,0}, 1.0118}, {{1971,2,28,0,0,0}, 1.0075}, {{2010,5,31,0,0,0}, 1.0403}} {dates, values} = Transpose[data]; diffs = Prepend[Differences[values], 0]; answer = Transpose[{dates, diffs}]
which returns:
{{{1971,1,31,0,0,0}, 0}, {{1971,2,28,0,0,0}, -0.0043}, {{2010,5,31,0,0,0}, 0.0328}}
To wrap this in one function, thanks Janus for the idea:
taildiffs[data_]:= Transpose @ {
Please note that the construction ... #1 ... #2 ... & is a pure function:
http://reference.wolfram.com/mathematica/ref/Function.html
The syntax of f@x simply abbreviated for f[x] .
Finally, f@ @list is short for Apply[f, list] :
http://reference.wolfram.com/mathematica/ref/Apply.html
So taildiffs, as defined above, is just a brief (possibly cryptic) version of this:
Apply[Transpose[Function[{x,y}, {x, Prepend[Differences[y],0]}], Transpose[data]]