Share
Explore

icon picker
Sign examples

Apply Sign() instead of SwitchIf()
As mentioned in my blog, see below. It was Joost who showed me the super powers of Sign().



Sign examples
1
startDate
birthDay
endDate
next birthday based on today
years subtracted
get time span
get the sign value
add min to sign
give me the year
sign applied by Joost
1
2008-10-08, 22:00:00
08/10/2008, 22:00:00
2011-04-03, 22:00:00
10/8/2024
3
188 days ago
-1
-1
2
2 years 5 months 26 days
2
1985-04-25, 22:00:00
25/04/1985, 22:00:00
2008-10-08, 22:00:00
4/25/2024
23
166 days
1
0
23
23 years 5 months 13 days
3
2023-12-31, 14:00:00
31/12/2023, 14:00:00
2424-12-31, 13:30:00
12/31/2024
401
30 mins ago
-1
-1
400
400 years 11 months 30 days 23 hrs 30 mins
4
2024-02-29, 00:00:00
29/02/2024, 00:00:00
2028-02-28, 00:00:00
3/1/2025
4
1 day ago
-1
-1
3
3 years 11 months 27 days
5
2023-12-31, 14:00:00
31/12/2023, 14:00:00
2024-03-31, 12:30:00
12/31/2024
1
275 days 1 hr 30 mins ago
-1
-1
0
2 months 30 days 22 hrs 30 mins
6
2000-03-01, 04:30:00
01/03/2000, 04:30:00
2045-03-25, 04:30:00
3/1/2025
45
24 days
1
0
45
45 years 24 days
7
2022-02-03, 14:00:00
03/02/2022, 14:00:00
2022-03-03, 14:00:00
2/3/2025
0
28 days
1
0
0
1 month
8
2024-02-28, 14:00:00
28/02/2024, 14:00:00
2028-02-28, 14:00:00
2/28/2025
4
-
0
0
4
4 years
9
2023-02-28, 01:00:00
28/02/2023, 01:00:00
2023-03-28, 01:00:00
2/28/2025
0
28 days
1
0
0
1 month
10
2023-01-01, 14:00:00
01/01/2023, 14:00:00
2023-12-31, 14:00:00
1/1/2025
0
364 days
1
0
0
11 months 30 days
11
2022-03-05, 11:00:00
05/03/2022, 11:00:00
2046-05-15, 11:00:00
3/5/2024
24
71 days
1
0
24
24 years 2 months 10 days
12
2022-08-08, 11:00:00
08/08/2022, 11:00:00
2032-05-11, 10:30:00
8/8/2024
10
89 days 30 mins ago
-1
-1
9
9 years 9 months 2 days 23 hrs 30 mins
13
2023-12-31, 14:00:00
31/12/2023, 14:00:00
2024-03-01, 12:30:00
12/31/2024
1
305 days 1 hr 30 mins ago
-1
-1
0
2 months 22 hrs 30 mins
14
2023-12-31, 14:00:00
31/12/2023, 14:00:00
2024-03-02, 12:30:00
12/31/2024
1
304 days 1 hr 30 mins ago
-1
-1
0
2 months 1 day 22 hrs 30 mins
15
2023-12-31, 14:00:00
31/12/2023, 14:00:00
2024-03-03, 12:30:00
12/31/2024
1
303 days 1 hr 30 mins ago
-1
-1
0
2 months 2 days 22 hrs 30 mins
16
2023-12-31, 14:00:00
31/12/2023, 14:00:00
2024-03-04, 12:30:00
12/31/2024
1
302 days 1 hr 30 mins ago
-1
-1
0
2 months 3 days 22 hrs 30 mins
17
2023-12-31, 14:00:00
31/12/2023, 14:00:00
2024-03-05, 12:30:00
12/31/2024
1
301 days 1 hr 30 mins ago
-1
-1
0
2 months 4 days 22 hrs 30 mins
18
2023-12-31, 14:00:00
31/12/2023, 14:00:00
2024-03-06, 12:30:00
12/31/2024
1
300 days 1 hr 30 mins ago
-1
-1
0
2 months 5 days 22 hrs 30 mins
19
2023-12-31, 14:00:00
31/12/2023, 14:00:00
2024-03-07, 12:30:00
12/31/2024
1
299 days 1 hr 30 mins ago
-1
-1
0
2 months 6 days 22 hrs 30 mins
20
2000-03-31, 14:00:00
31/03/2000, 14:00:00
2001-03-31, 14:00:00
3/31/2024
1
-
0
0
1
1 year
21
2020-09-14, 14:00:00
14/09/2020, 14:00:00
2044-10-01, 14:00:00
9/14/2024
24
17 days
1
0
24
24 years 17 days
22
2020-07-14, 14:00:00
14/07/2020, 14:00:00
2021-09-14, 13:30:00
7/14/2024
1
61 days 23 hrs 30 mins
1
0
1
1 year 1 month 30 days 23 hrs 30 mins
23
2023-12-31, 23:00:00
31/12/2023, 23:00:00
2424-12-31, 23:00:00
12/31/2024
401
-
0
0
401
401 years
24
2023-10-16, 23:00:00
16/10/2023, 23:00:00
2023-10-17, 23:00:00
10/16/2024
0
1 day
1
0
0
1 day
25
2023-10-17, 02:00:00
17/10/2023, 02:00:00
2024-10-17, 02:00:00
10/17/2024
1
-
0
0
1
1 year
26
2024-01-29, 14:00:00
29/01/2024, 14:00:00
2024-03-01, 14:00:00
1/29/2025
0
32 days
1
0
0
1 month 1 day
27
2023-01-28, 00:30:00
28/01/2023, 00:30:00
2023-02-28, 01:00:00
1/28/2025
0
31 days 30 mins
1
0
0
1 month 30 mins
28
2023-01-01, 09:00:00
01/01/2023, 09:00:00
2023-12-31, 09:30:00
1/1/2025
0
364 days 30 mins
1
0
0
11 months 30 days 30 mins
29
2023-12-31, 14:00:00
31/12/2023, 14:00:00
2024-03-01, 14:00:00
12/31/2024
1
305 days ago
-1
-1
0
2 months 1 day
30
2023-12-31, 14:00:00
31/12/2023, 14:00:00
2024-04-01, 14:00:00
12/31/2024
1
274 days ago
-1
-1
0
3 months 1 day
31
2023-03-31, 17:00:00
31/03/2023, 17:00:00
2023-05-30, 17:00:00
3/31/2024
0
60 days
1
0
0
1 month 30 days
32
2020-07-16, 10:00:00
16/07/2020, 10:00:00
2036-04-06, 11:00:00
7/16/2024
16
100 days 23 hrs ago
-1
-1
15
15 years 8 months 21 days 1 hr
33
2022-05-12, 11:00:00
12/05/2022, 11:00:00
2042-09-05, 11:00:00
5/12/2024
20
116 days
1
0
20
20 years 3 months 24 days
34
2022-05-12, 11:00:00
12/05/2022, 11:00:00
2042-09-05, 10:30:00
5/12/2024
20
115 days 23 hrs 30 mins
1
0
20
20 years 3 months 23 days 23 hrs 30 mins
35
2020-08-09, 12:30:00
09/08/2020, 12:30:00
2035-12-12, 14:30:00
8/9/2024
15
125 days 2 hrs
1
0
15
15 years 4 months 3 days 2 hrs
36
2021-02-26, 11:00:00
26/02/2021, 11:00:00
2047-11-24, 12:00:00
2/26/2025
26
271 days 1 hr
1
0
26
26 years 8 months 29 days 1 hr
37
2024-03-01, 12:00:00
01/03/2024, 12:00:00
2025-03-01, 12:00:00
3/1/2025
1
-
0
0
1
1 year
38
2023-10-18, 12:00:00
18/10/2023, 12:00:00
2023-10-18, 12:00:00
10/18/2024
0
-
0
0
0
39
2024-02-29, 01:00:00
29/02/2024, 01:00:00
2028-02-29, 01:00:00
3/1/2025
4
-
0
0
4
4 years
40
2023-09-08, 19:00:00
08/09/2023, 19:00:00
2023-10-12, 19:00:00
9/8/2024
0
34 days
1
0
0
1 month 4 days
41
2000-03-24, 04:50:03
24/03/2000, 04:50:03
2045-03-31, 03:15:13
3/24/2024
45
6 days 22 hrs 25 mins 10 secs
1
0
45
45 years 6 days 22 hrs 25 mins 10 secs
42
2000-03-25, 04:30:00
25/03/2000, 04:30:00
2045-03-25, 04:30:00
3/25/2024
45
-
0
0
45
45 years
43
2023-10-14, 14:00:00
14/10/2023, 14:00:00
2024-10-14, 13:30:00
10/14/2024
1
30 mins ago
-1
-1
0
11 months 29 days 23 hrs 30 mins
44
2023-10-19, 15:00:00
19/10/2023, 15:00:00
2024-10-19, 13:30:00
10/19/2024
1
1 hr 30 mins ago
-1
-1
0
11 months 29 days 22 hrs 30 mins
45
2023-08-29, 00:00:00
29/08/2023, 00:00:00
2023-08-29, 00:02:00
8/29/2024
0
2 mins
1
0
0
2 mins
46
2023-08-29, 00:00:00
29/08/2023, 00:00:00
2023-08-29, 01:30:00
8/29/2024
0
1 hr 30 mins
1
0
0
1 hr 30 mins
47
2023-08-27, 00:00:00
27/08/2023, 00:00:00
2023-08-29, 01:30:00
8/27/2024
0
2 days 1 hr 30 mins
1
0
0
2 days 1 hr 30 mins
48
2023-08-30, 08:00:00
30/08/2023, 08:00:00
2023-09-06, 08:00:00
8/30/2024
0
7 days
1
0
0
7 days
49
2023-11-30, 14:00:00
30/11/2023, 14:00:00
2024-08-14, 13:30:00
11/30/2024
1
108 days 30 mins ago
-1
-1
0
8 months 14 days 23 hrs 30 mins
50
2023-04-01, 02:00:00
01/04/2023, 02:00:00
2023-05-01, 02:00:00
4/1/2024
0
30 days
1
0
0
1 month
51
2023-12-31, 08:10:00
31/12/2023, 08:10:00
2024-02-29, 08:00:00
12/31/2024
1
306 days 10 mins ago
-1
-1
0
1 month 28 days 23 hrs 50 mins
There are no rows in this table

Below (left) a function to get the age, this is an often applied logic, right the signed version
Today().Year() - thisRow.birthday.Year() -
If(
Date(
Today().Year(),
thisRow.birthday.Month(),
thisRow.birthday.Day()
) >
Today(),
1,
0
)

Min(0,
Sign(
Today() -
Date(
Today().Year(),
thisRow.birthDay.Month(),
thisRow.birthDay.Day()
)
)
) + Today().Year() - thisRow.birthDay.Year()

EU Formats
1
birthDay
nextBirthDayEU
ageNormal
i
ageSign
step01Sign
i
step02Sign
i
step03Sign
i
1
08/10/2008, 22:00:00
10/8/2024
15
15
220 days ago
-1
15
2
25/04/1985, 22:00:00
4/25/2024
38
38
54 days ago
-1
38
3
31/12/2023, 14:00:00
12/31/2024
0
0
304 days ago
-1
0
4
29/02/2024, 00:00:00
3/1/2025
0
0
2 days
1
0
5
31/12/2023, 14:00:00
12/31/2024
0
0
304 days ago
-1
0
6
01/03/2000, 04:30:00
3/1/2025
24
24
1 day
1
24
7
03/02/2022, 14:00:00
2/3/2025
2
2
28 days
1
2
8
28/02/2024, 14:00:00
2/28/2025
0
0
3 days
1
0
9
28/02/2023, 01:00:00
2/28/2025
1
1
3 days
1
1
10
01/01/2023, 14:00:00
1/1/2025
1
1
61 days
1
1
11
05/03/2022, 11:00:00
3/5/2024
1
1
3 days ago
-1
1
12
08/08/2022, 11:00:00
8/8/2024
1
1
159 days ago
-1
1
13
31/12/2023, 14:00:00
12/31/2024
0
0
304 days ago
-1
0
14
31/12/2023, 14:00:00
12/31/2024
0
0
304 days ago
-1
0
15
31/12/2023, 14:00:00
12/31/2024
0
0
304 days ago
-1
0
16
31/12/2023, 14:00:00
12/31/2024
0
0
304 days ago
-1
0
17
31/12/2023, 14:00:00
12/31/2024
0
0
304 days ago
-1
0
18
31/12/2023, 14:00:00
12/31/2024
0
0
304 days ago
-1
0
19
31/12/2023, 14:00:00
12/31/2024
0
0
304 days ago
-1
0
20
31/03/2000, 14:00:00
3/31/2024
23
23
29 days ago
-1
23
21
14/09/2020, 14:00:00
9/14/2024
3
3
196 days ago
-1
3
22
14/07/2020, 14:00:00
7/14/2024
3
3
134 days ago
-1
3
23
31/12/2023, 23:00:00
12/31/2024
0
0
304 days ago
-1
0
24
16/10/2023, 23:00:00
10/16/2024
0
0
228 days ago
-1
0
25
17/10/2023, 02:00:00
10/17/2024
0
0
229 days ago
-1
0
26
29/01/2024, 14:00:00
1/29/2025
0
0
33 days
1
0
27
28/01/2023, 00:30:00
1/28/2025
1
1
34 days
1
1
28
01/01/2023, 09:00:00
1/1/2025
1
1
61 days
1
1
29
31/12/2023, 14:00:00
12/31/2024
0
0
304 days ago
-1
0
30
31/12/2023, 14:00:00
12/31/2024
0
0
304 days ago
-1
0
31
31/03/2023, 17:00:00
3/31/2024
0
0
29 days ago
-1
0
32
16/07/2020, 10:00:00
7/16/2024
3
3
136 days ago
-1
3
33
12/05/2022, 11:00:00
5/12/2024
1
1
71 days ago
-1
1
34
12/05/2022, 11:00:00
5/12/2024
1
1
71 days ago
-1
1
35
09/08/2020, 12:30:00
8/9/2024
3
3
160 days ago
-1
3
36
26/02/2021, 11:00:00
2/26/2025
3
3
5 days
1
3
37
01/03/2024, 12:00:00
3/1/2025
0
0
1 day
1
0
38
18/10/2023, 12:00:00
10/18/2024
0
0
230 days ago
-1
0
39
29/02/2024, 01:00:00
3/1/2025
0
0
2 days
1
0
40
08/09/2023, 19:00:00
9/8/2024
0
0
190 days ago
-1
0
41
24/03/2000, 04:50:03
3/24/2024
23
23
22 days ago
-1
23
42
25/03/2000, 04:30:00
3/25/2024
23
23
23 days ago
-1
23
43
14/10/2023, 14:00:00
10/14/2024
0
0
226 days ago
-1
0
44
19/10/2023, 15:00:00
10/19/2024
0
0
231 days ago
-1
0
45
29/08/2023, 00:00:00
8/29/2024
0
0
180 days ago
-1
0
46
29/08/2023, 00:00:00
8/29/2024
0
0
180 days ago
-1
0
47
27/08/2023, 00:00:00
8/27/2024
0
0
178 days ago
-1
0
48
30/08/2023, 08:00:00
8/30/2024
0
0
181 days ago
-1
0
49
30/11/2023, 14:00:00
11/30/2024
0
0
273 days ago
-1
0
50
01/04/2023, 02:00:00
4/1/2024
0
0
30 days ago
-1
0
51
31/12/2023, 08:10:00
12/31/2024
0
0
304 days ago
-1
0
There are no rows in this table
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.