Does FoxPro not have a DATEDIFF statement?
INSERT INTO newTable(primary_key, Diff)
SELECT primary_key, DATEDIFF(?, DateCol1, DateCol2)
I put ? in there for two reasons: (a) I don't know if FoxPro accepts string
parameters or named constants, and (b) you didn't bother telling us what
difference you want (hours, days, years, ...)
"Dave Navarro" <davedave.dave> wrote in message
news:MPG.199fce26bd82f77f989746news-east.giganews.com...> I am accessing a Fox Pro database through ODBC in ASP.
> I have a table with two dates in it. A start date and an end date. I
> need to create a table with the difference between the two dates.
> Is the only way to load each record into an array and calculate the
> difference myself, or can it be done in the SELECT statement?