DAYSTO

Returns the number of days (or units) to a particular event/date.

event_nameThe actual cells to average.
unit(Optional) The unit to use:
Days
Months
Years
display_unit(Optional) Whether to display the unit after the number.

REMARKS
* If "unit" is left blank, then Days is used.
* If "display_unit" is left blank, then True is used.
* The equivalent VBA function is DAYSTO

 A
1=JS.DAYSTO("Christmas") = 291 days
2=JS.DAYSTO("Christmas", "days") = 291 days
3=JS.DAYSTO("Christmas", "months") = 9.567119700000001 months
4=JS.DAYSTO("Christmas", "years") = 'years' is an invalid unit
5=JS.DAYSTO("CHRISTMAS") = 291 days
6=JS.DAYSTO("Easter") = 0
7=JS.DAYSTO("Mothers Day") = 0
8=JS.DAYSTO("Fathers Day") = 0


© 2025 Better Solutions Limited. All Rights Reserved. © 2025 Better Solutions Limited TopPrevNext