Skip to content

Commit 74e1666

Browse files
author
nianiB9
committed
Update cursorDate to calculate date from 1 year ago
1 parent 2d548f0 commit 74e1666

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

launcher-csharp/Monitor/Examples/GetMonitoringDataFunc.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ public virtual IEnumerable<object> Invoke(string accessToken, string requestPath
3333

3434
// Declare variables
3535
//ds-snippet-start:Monitor1Step3
36+
DateTime cursorDate = DateTime.UtcNow.AddYears(-1);
3637
bool complete = false;
37-
string cursorValue = string.Empty;
38+
string cursorValue = cursorDate.ToString("yyyy-MM-dd") + "T00:00:00Z";
3839
int limit = 2000; // Amount of records you want to read in one request
3940
List<object> functionResult = new List<object>();
4041

0 commit comments

Comments
 (0)