Countdown of days

104 views
Skip to first unread message

Julio Corominas

unread,
Jun 27, 2015, 10:07:35 AM6/27/15
to memento...@googlegroups.com
Can memento Data Base make countdown of days that depend on a condition?

Graham Wood

unread,
Oct 4, 2023, 8:56:39 PM10/4/23
to mementodatabase
not sure if this is what your looking for but I have a Travel Database that I add flights bookings for accomodation and dates etc.
It also shows a countdown for when my holiday starts. see attached image and this is the script I added into a Calculation field for it. So basically when it gets to 0 it will show 0 days to go and always sho 0.
If thats not there it will go into negative days to go

if(#{from date}-now()<=0,0,#{from date}-now()).toFixed()/86400

Screenshot_2023-10-05-11-50-05-33_1a0e309e342d0b39d45ce86487c154fd.jpg

Bill Crews

unread,
Oct 4, 2023, 9:38:30 PM10/4/23
to Graham Wood, mementodatabase
I just learned something. While the JavaScript Number object has a method toFixed(), which can have an integer argument indicating the number of decimal digits that are to be to the right of the decimal point, I had no idea until now that Calculation field scripts could call toFixed() or even had objects at all. I can only fantasize on how that came about, but it is clearly proven to be true. Yay! 😁


--
You received this message because you are subscribed to the Google Groups "mementodatabase" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mementodataba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mementodatabase/68c0f6ee-6c08-4c1e-88d2-3ba6d04319ddn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages