Countdown between 2 dates

Hello, I’m going to my daughter’s wedding in about ten days, can you help me write a countdown from the current time to the ceremony time? I think I’m a little old to do math…
In hours, even seconds. Thank you for your help, if you accept the challenge.

Here it is:

DAYS:

(floor((((1659154830-([UTC_TS]/1000))/60)/60)/24))

HOURS

(floor((((((1659154830-([UTC_TS]/1000))/60)/60)/24)%1)*24))

MINUTES

(floor((((((((1659154830-([UTC_TS]/1000))/60)/60)/24)%1)*24)%1)*60))

SECONDS

(floor((((((((((1659154830-([UTC_TS]/1000))/60)/60)/24)%1)*24)%1)*60)%1)*60))

Replace 1659154830 with your event UTC Timestamp in seconds. Maybe it can be written better, but I don’t have much time to think about it :smiley:

I wish your daughter all the best in life and enjoy the wedding!

Tomas

Edit: Simple way

  1. Install Google Clock app
  2. create or use watch face with a custom complication (preferably RANGED_VALUE or SHORT_TEXT)
  3. customize & add “Countdown to date” complication
  4. set event date when prompted and profit !
2 Likes

A big thank you for your collaboration and thank you, also for your wishes for the wedding. My daughter (French, but also English for 3 years) is marrying an Englishman from Newcastle, in Newcastle. I will have to improve my English.
Again a big thank you!

1 Like

Thanks a lot Tomas! I did it. Countdown is in the upper right corner.
I blurred the photo. They are fans of “Star Wars”
Screenshot_Countdown

3 Likes

Perfect !

No problem :slight_smile:
Have a great week !

Finally, this is what I did :

(floor((((“Event UTC Timestamp in seconds”-([UTC_TS]/1000))/60)/60)/24)) j
(floor((((“Event UTC Timestamp in seconds”-([UTC_TS]/1000))/60)/60)%24)) h
(floor((((“Event UTC Timestamp in seconds”-([UTC_TS]/1000))/60)%60))) mn
(floor((((“Event UTC Timestamp in seconds”-([UTC_TS]/1000))%60)))) s

Thanks Tomas.

1 Like

I used your equations for my clock face and set the countdown to the New Year. In WFS, I see that it works. But when I assemble the watch face and send it to my Galaxy Watch 4 Classic 46mm, I see that the seconds and minutes counters get stuck and do not update on time. So I was looking for another solution. And I found it)) Since the countdown of minutes and seconds does not depend on the appointed date, I used simple calculations:
Minutes:

(59-[MIN])

Seconds:

(59-[SEC])