Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Offset for week

Former Member
0 Likes
667

Hello,

with the function 'DATE_GET_WEEK' I get for a specific date a calender week. Is there a function to get an offset from 143 weeks from the calculatet result?

Backround information:

The Problem we have, is that we have a job, which runs once a week, but not on a fixed time. With this job we select customer with a contract which was purchased in a specific week in the past.

Kind regards

Holger

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
378

You can get a week date range by date using this function module.

GET_WEEK_INFO_BASED_ON_DATE

It will take the imported date, call the function module DATE_GET_WEEK to get the week, then call WEEK_GET_FIRST_DAY to get the date of the first day of the week, then will add 6 to that to get the last day of the week.

If will return the start and end dates of the week.

Regards,

Rich Heilman

Message was edited by: Rich Heilman

1 REPLY 1
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
379

You can get a week date range by date using this function module.

GET_WEEK_INFO_BASED_ON_DATE

It will take the imported date, call the function module DATE_GET_WEEK to get the week, then call WEEK_GET_FIRST_DAY to get the date of the first day of the week, then will add 6 to that to get the last day of the week.

If will return the start and end dates of the week.

Regards,

Rich Heilman

Message was edited by: Rich Heilman