By running a MySQL query. There will be up to 100 different names/accounts that will need to be calculated. I have very little experience in MySQL, mainly because I've never had to use it until now, and even then, this is all I'd need to use it for. There are other ways I could go about this, but for simplicity's sake, let's say it must be done using MySQL.
I know it'd be fairly simple to do for someone experienced in MySQL, and I'd learn to do it myself, but I am somewhat on a short schedule, a few days actually.
This is actually just a .csv file. It is formatted that way just because that is how it is pulled from the database. I just want to run a query on it in order to add the total times of "duration".
Last things first: The error message from the LOAD DATE INFILE means that your table test was not created correctly.
For some reason, you created the field `Agent Name` as an INT(eger) field when clearly it should be VARCHAR(50) or something like that.
But I don't understand this, at all.
In your post #4 you wrote "This is actually just a .csv file. It is formatted that way just because that is how it is pulled from the database. " So if you pull the CSV file *FROM* the database WHY in the world are you now trying to put it BACK into the dataabase? I don't understand the reasoning behind that, at all.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
So you *SEEM* to be saying that http://i.stack.imgur.com/ASSvl.png shows the raw data in your table. You never bother to say what the name of the table is, you know.
SELECT `Agent Name`,`Username`,
DATE(`Login Time`) AS `Date`,
SUM ( TIMEDIFF( `Login Time`, `Logout Time` ) ) AS Duration
FROM yourtablename
GROUP BY `Agent Name`, `Username`, DATE(`Login Time`)
ORDER BY `Agent Name`, `Date`
Though this assumes the your Login Time and Logout Time fields in the table are indeed DATETIME values.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.