KeyRoutines
StepFreedate.difference

Count the days or hours between two dates on Windows

Time between dates measures the gap from one date to another in the unit you pick. Leave the later date empty to measure up to now, which is how you ask "how long since" or "how long until".

How it works

  • Set the earlier date, the later date (empty means now) and a unit from seconds up to weeks.
  • You get the amount with its fraction, a whole-number version, and the gap as a duration.
  • The amount is negative when the first date is actually later than the second.
  • Dates can be typed like 2026-10-17 or 2026-10-17 09:30, or come from earlier steps.

Routines that use it

Days until a trip

Measure from now to the trip date in days and read the whole number aloud with Speak text.

Old file check

Take a file's date from Get file info and delete it with Delete to Recycle Bin when it's more than 30 days old.

Since the last run

Compare a remembered time with now and only continue with Compare values when at least an hour has passed.

Settings

SettingWhat it does
FromThe earlier date.
ToThe later date. Keep empty for now.
UnitCount the time in these units.

Good to know

  • The largest unit is weeks; months and years aren't offered because their length varies.

Questions

How do I count days until a date in a routine?
Use Time between dates with From empty, To set to the date, and the unit days. Swap them round if you put the future date first and you'll get a negative number.
Can I get a whole number of days?
Yes. Besides the exact amount, the step also gives a whole-number result you can use directly.

Pairs well with

Build this routine in KeyRoutines

Free from the Microsoft Store for Windows 11 and 10. Pro is a one-time upgrade.