Date Difference Calculator

There has been some requests for a countdown timer. But I’d like to ask the question a different way: Has anyone made a date difference calculator?

In this situation It would compare the current date with the goal date. So if you asked it to calculate from today until Halloween it would return 10 months 2 weeks 4 days

I’m having a difficult time trying to figure this one out. Help! :slightly_smiling_face:

1 Like

Here’s a start:

The problem is always leap years, etc. Either way, you can easily calculate the months left with a modified form of the above.

I haven’t done code in a while but here’s a long way to do it:
$#DM#=1?9:$$#DM#=2?8:$$#DM#=3?7:$$#DM#=4?6:$$#DM#=5?5:$$#DM#=6?4:$$#DM#=7?3:$$#DM#=8?2:$$#DM#=9?1:$$#DM#=10?0:$$#DM#=11?11:$$#DM#=12?10:$ months until Oct.

Then you’d do a formula to count the days between 31 and whatever day you’re on… to get the number of days difference. IE: Today is the 16th day, so 31-16= number of days.

Calculate the number of days remaining in the month:
((#DIM#-#Dd#)-1) days left

So you’ll get:
10 Months
14 Days
with the above as of Dec 16 2019

You could probably calculate the number of weeks by dividing the number of days left by 7 or something else… anyways it’s a start. Hopefully someone can chime in further.

1 Like

Me to

Well i understand that but where do you put the codes

Hi @stellahayward74

When you add an object to the watch face you can edit its settings in “Advanced Settings” tab on the left, if that tab is not showing:

  1. select the object
  2. click on the “Rocket” button on the bottom left
  3. in your case it should be a text or date object, on the Advanced Settings tab you will see the “Text” field on top, enter the formula or text you wish there

I hope this helps

1 Like

This is awesome, thanks so much!!!