# Calculating the delta between now and timestamp

**URL:** https://community.glideapps.com/t/calculating-the-delta-between-now-and-timestamp/11285
**Category:** Ask for Help
**Created:** [June 22, 2020, 9:40pm UTC](https://community.glideapps.com/t/calculating-the-delta-between-now-and-timestamp/11285 "2020-06-22T21:40:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Sandro\_Brito](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sandro_brito/32/552_2.png) [@Sandro\_Brito](https://community.glideapps.com/u/Sandro_Brito)
#### Post date: [June 22, 2020, 9:40pm UTC](https://community.glideapps.com/t/calculating-the-delta-between-now-and-timestamp/11285/1 "2020-06-22T21:40:38Z")

</div>

Hello folks  
I want to write a script that will run periodically and change things when the delta between now and the time of the creation of a row.  
Anyone know how to calculate this on the spreadsheet?

Thank’s in advanced

---

<div class="post-metadata">

### Author: ![Roberto\_Salim](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roberto_salim/32/6861_2.png) [@Roberto\_Salim](https://community.glideapps.com/u/Roberto_Salim)
#### Post date: [June 22, 2020, 9:53pm UTC](https://community.glideapps.com/t/calculating-the-delta-between-now-and-timestamp/11285/2 "2020-06-22T21:53:48Z")

</div>

I have a calendar application, which compares the old date with now, if confirmed it brings the word delete to the column, and the agedendado script searches through it daily and if it finds that word it deletes the line, I don’t know if it will serve you.

this is the formula I use  
= SEERRO (ARRAYFORMULA (SE (C2: C = “”; “”; SE (DATADIF (C2: C; NOW (); “D”)\> 2; “DELETE”; “”))))

this is the script

 ![Capturar](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/1/1a8097d370a783fb33192669b1412529dd477a0a.png)

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [June 23, 2020, 12:50am UTC](https://community.glideapps.com/t/calculating-the-delta-between-now-and-timestamp/11285/3 "2020-06-23T00:50:14Z")

</div>

Hi Sandro.

I believe you have an answer based on Roberto’s formula already, but just a warning if you want the difference to be in seconds/minutes/hours then do a further math inside that.

If you need more help feel free to comment here.
