Skip to content

Commit 34e4082

Browse files
authored
Add README for Date Difference snippet
This README provides an example and details on how to calculate the difference in days between two date/time values using GlideDateTime.
1 parent 60389da commit 34e4082

File tree

1 file changed

+12
-0
lines changed
  • Server-Side Components/GlideDateTime/DateCalculations/DateDifference

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Date Difference Snippet
2+
3+
**Author:** Harish
4+
**Category:** GlideDateTime / Date Calculations
5+
**Use Case:** Calculate the difference in days between two date/time values.
6+
7+
## Description
8+
This snippet uses `GlideDateTime` and `gs.dateDiff()` to calculate the number of days between two given date/time strings.
9+
10+
## Example
11+
```js
12+
gs.info(getDateDifferenceInDays('2025-10-01 00:00:00', '2025-10-16 00:00:00'));

0 commit comments

Comments
 (0)