I often run database queries that return sets of {date, datum} objects. A hypothetical query looks like
testData = SQLExecute[commodDB, "select date,price from commoddb.tbcommodprices
where futurePrefix='XB'"];
and the results look like
{{SQLDateTime[{2005, 10, 3}], 188.88}, {SQLDateTime[{2005, 10, 4}],
184.53}, {SQLDateTime[{2005, 10, 5}],
176.5}, {SQLDateTime[{2005, 10, 6}],
172.}, {SQLDateTime[{2005, 10, 7}] . . . etc}
To do anything useful with these, I need to convert the SQLDateTime[] objects into Mathematica datelists. With the example above, this can be done with
Map[{#[[1]][[1]], #[[2]]} &, testData]
But this takes longer than I would like; I feel as though this conversion is trivial and should be basically instantaneous, but for typical queries (which admittedly return thousands of results), the conversion takes half a second or more.
Can anybody suggest a quicker way to convert my SQLDateTime[]s into DateLists?
Thanks.