Skip to content

Commit 903a483

Browse files
authored
Update README.md
1 parent 84c8161 commit 903a483

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,23 @@ This is a native rest connector. This repo is for additional tools specific to G
2525

2626

2727
### Populate Automated Deletion Date
28-
TBD
28+
This script column sets up the automated deletion date so it can be populated in AD when the account is disabled
29+
```
30+
let daysInFuture = 365;
31+
32+
let date = new Date();
33+
date.setDate(date.getDate() + daysInFuture);
34+
let year = date.getUTCFullYear();
35+
let month = date.getUTCMonth()+1;
36+
let day = date.getUTCDate();
37+
38+
if (day < 10) { day = '0' + day; }
39+
if (month < 10) { month = '0' + month; }
40+
41+
let deleteDate = '' + year + '-' + month + '-' + day
42+
43+
return deleteDate;
44+
```
2945

3046
### Evaluate Automated Deletion Date
3147
This script column is used to determine if Automated Delete Date is in the future. If in the future, then the result is true.

0 commit comments

Comments
 (0)