Question: I'm trying to create a simple doc on google docs, I have a sheet called "Income" 

With A Being name, B being a date, and C being the amount

What I need to do is get the amount for this month, date format is dd/mm/yyyy 

Any help would be appreciated!

Answer: 
You want:

```
dif = (end.tv_sec - start.tv_sec) + (end.tv_usec - start.tv_usec) / 1000.0;

```

Note 1: You need the tv\_sec to handle even a short duration crossing a second ticking over.

Note 2: Second term divides by a 1000.0 so as to use floating point rather than integer division.
On Linux the best way to achieve this is to use the times(2) interface rather than gettimeofday(2) have a read of the man page. 

> 
> man 2 times.
> 
> 
> 

It has exquisite fidelity.