We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5d284c5 commit 2e48dd0Copy full SHA for 2e48dd0
Server-Side Components/Server Side/calculate difference between two dates in years, months, and days/README.md
@@ -0,0 +1,22 @@
1
+# Get Age in Years, Months, Days
2
+
3
+This snippet calculates the difference between two dates in **years, months, and days**.
4
+A common use case is to calculate a person’s age from their birthdate or determine elapsed time between two date fields.
5
6
+---
7
8
+## 🔹 Inputs
9
+- `startDate` – Earlier date (e.g., Birthdate) as a `GlideDateTime`.
10
+- `endDate` – Later date (e.g., Today) as a `GlideDateTime`.
11
12
13
14
+## 🔹 Output
15
+Returns an object in the format:
16
17
+```json
18
+{
19
+ "years": <number>,
20
+ "months": <number>,
21
+ "days": <number>
22
+}
0 commit comments