Jump to content

find the difference


sandy1028

Recommended Posts

          0 | 2008-06-10 15:30:01 | A
           1 | 2008-06-10 15:40:01 | A  // Calcute timestamp as 10 min
           1 | 2008-06-10 15:50:01 |A //Skip
           1 | 2008-06-10 16:00:01 |A  //Skip
           1 | 2008-06-10 16:10:01 |A   //Skip
           0 | 2008-06-10 16:20:01 |A   // Calcute timestamp as 10 min
           1 | 2008-06-10 16:30:01 |A  
           1 | 2008-06-10 16:40:01 |A  //Skip
           1 | 2008-06-10 16:50:01 |A  //Skip
           1 | 2008-06-10 17:00:01 |A  //Skip
           0 | 2008-06-10 17:10:01 |A   
           1 | 2008-06-10 17:20:01 |A   //Calcute difference as 10 min
           1 | 2008-06-10 17:30:01 |A   
           0 | 2008-06-10 17:40:01 |A
           0 | 2008-06-10 17:50:01 |A //Clauculate as 20 min

 

and how to push into array as it shows like this in the table

         

The fields are Status, imestamp and Name.

As in the above example

It should display as

 

In the table the

 

Name| Start Time | End Time | Difference

 

A | 2008-06-10 15:30:01 |2008-06-10 15:40:01 | 10

A | 2008-06-10 16:10:01  | 2008-06-10 16:20:01 | 10

 

 

Based on the status 0 timestamp difference has to be calculated.

 

Please help me.

 

 

 

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.