cancel
Showing results for 
Search instead for 
Did you mean: 

Given a date, how to find the nearest Monday using SAC Data Action

SP9
Explorer
0 Kudos

Hi Experts,

Given a date in integer format, how to find the nearest Monday of it in SAP SAC data action. 

We have a date in interger format in a measure called: "Shipment Date", that will be entered by the planner, and we need to find the nearest Monday after 10 days, that's the max "Delivery by Date".

So, for example, Shipment date is: 05/27/2024,  the delivery date should be calculated as: 06/03/2024, instead of 06/10/2024, as this is the nearest Monday to date: 06/06/2024, when added 10 days to 05/27/2024. 

Thanks,

SP

View Entire Topic
MKreitlein
Active Contributor
0 Kudos

Hello @SP9 

I doubt that you will find a good solution for that in SAC.

But you could maybe testing if you can utilize the Date's Day name colunm:

SAC_Date_dayname.png

I'm not sure if you can access this... but even if it might become a complex logic?!
Good luck,

Martin

SP9
Explorer
0 Kudos
Thanks Martin. Good idea but complex. Thanks