Smartmeter, which process?

Hello,

 

I have a meter who measure the total delivery and consumption from the net.

Both is an increment counter.

example:

24556
24557
24558
...

 

of cource depends of the time, who I upload the data.

 

But which process I have to use, to get:

Total daily consumption
 

Thank you!