Re: Count days since the last recorded rainfall
Posted: Fri Feb 24, 2023 6:44 pm
Ti ringrazio ancora per l'aiuto che mi hai dato , avrei un'altra domanda se posso , è possibile fare in modo che il conteggio del tempo che passa dall'ultima pioggia funzioni solo con una determinata quantità di pioggia in su? in poche parole che conti giorno di pioggia solo se supera una certa quantità di acqua , ad esempio 0.6 o 1.0 mm . Grazie mille.Mattk wrote: ↑Sat Jun 25, 2022 11:42 pm The following will give you the number of whole and decimal part days from the current time to the time of last rain record. This simply determines the number of seconds between the current epoch (in linux time) to the linux epoch time of last rain record. Divide that by 86400 (# seconds in a day) and you have the number of complete days
{*([epoch]-[rain0total-nonzerotime=epoch])/86400:--*}
By including a 0 (zero) *0} before the end of the expression then the output will be an integer number of whole days rounded
{*([epoch]-[rain0total-nonzerotime=epoch])/86400:--*0}