C
ccIces
Guest
Hello all,
I have a data table that lists user log ins sequentially by date. I need to write a function for use in a update query that will calculate the datediff in minutes between each change in user log in.
My table loogs like this
aaa123, stn1, 2005-08-08 12:00
bbb222, stn1, 2005-08-08 13:00
ccc333, stn1, 2005-08-08 14:00
and I need to end up with this:
aaa123, stn1, 2005-08-08 12:00 60(or time however it is expressed)
bbb222, stn1, 2005-08-08 13:00 60
ccc333, stn1, 2005-08-08 14:00 60
the way I figure it I need a function in my query similar to this
expr1: datediff( "n", starttime, endtime)
but I need to figure out how to put the end time in there which is the start time of the next record in the table.
I have a data table that lists user log ins sequentially by date. I need to write a function for use in a update query that will calculate the datediff in minutes between each change in user log in.
My table loogs like this
aaa123, stn1, 2005-08-08 12:00
bbb222, stn1, 2005-08-08 13:00
ccc333, stn1, 2005-08-08 14:00
and I need to end up with this:
aaa123, stn1, 2005-08-08 12:00 60(or time however it is expressed)
bbb222, stn1, 2005-08-08 13:00 60
ccc333, stn1, 2005-08-08 14:00 60
the way I figure it I need a function in my query similar to this
expr1: datediff( "n", starttime, endtime)
but I need to figure out how to put the end time in there which is the start time of the next record in the table.