Hello Renze,
I would suggest that you just use [Week = '[%BeginOfCurrentWeekUTC%]'] and always assign the week to be '[%BeginOfCurrentWeekUTC%]'.
I would also ensure that your date is not localised.
Using UTC dates means that you’ll be getting the same result every time and should be able to reliably use simple “equals” without any additional function.
Hope this helps.
Hi Renze,
I need some more information to help you. Is the ‘Week’ a DateTime attribute on your HistoryHelper object? Can you be more specific about what ‘my code does not work’ means?
If you are sure that that attribute has the correct timestamp, I would recommend you to have a seperate create Variable activity that creates the week-from-dateTime('[%BeginOfCurrentWeek%]') value. With debugging, you can check whether it gives an unexpected value.
Did you try DateToCheck >= [%BeginOfCurrentWeek%] and DateToCheck <= [%EndOfCurrentWeek%]?
Regards,
Ronald