Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2024 09:36 PM
I have below end point :
https://api12preview.sapsf.eu/odata/v2/EmpJob?$filter=lastModifiedDateTime+gt+datetimeoffset'2024-03-03T00:00:00Z'>> in to replace this date and time for every day running scheduled job.
Solved! Go to Solution.
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 02:28 PM
Hi, hopefully this will help you with possible solution
var myURLBase = "https://api12preview.sapsf.eu/odata/v2/EmpJob?$filter=lastModifiedDateTime+gt+datetimeoffset'";
var myURLSuffix = "T00:00:00Z'";
var gdt = new GlideDateTime();
gs.info('Today ' + gdt.getDate());
gdt.addDays(-1);
gs.info('Yesterday ' + gdt.getDate());
var myURL = myURLBase + gdt.getDate() + myURLSuffix;
gs.info(myURL);
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 02:28 PM
Hi, hopefully this will help you with possible solution
var myURLBase = "https://api12preview.sapsf.eu/odata/v2/EmpJob?$filter=lastModifiedDateTime+gt+datetimeoffset'";
var myURLSuffix = "T00:00:00Z'";
var gdt = new GlideDateTime();
gs.info('Today ' + gdt.getDate());
gdt.addDays(-1);
gs.info('Yesterday ' + gdt.getDate());
var myURL = myURLBase + gdt.getDate() + myURLSuffix;
gs.info(myURL);