I have some difficulty to convert expression like "-CW" into a date formulavariable. We are using both French and English environment so using "-CW" is cause quite a issue.
What I need to do is to calculate the first day of the current week. Then Find the first day and the last day of next week and the same thing for the week after.
1- I'm using "-CW " to get the first day of the current week.
2- I'm using "+1W" to get the first day of the next week from the date find in step 1
3- Then "+1W-1D" from the date find in step 2 and so on...
It is working great as long as the users don’t use the French version... I Read that using DateFormula variable will become language insensitive but I can't figure it out...
Any idea on how i can convert the code?
Patrick Venner
programmeur-analyste
Cabico Custom Cabinetry0
Answers
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Thanks
programmeur-analyste
Cabico Custom Cabinetry
To assign to a DateFormula variable you need to use EVALUATE unless you have a value of type DateFormula already that is stored in some variable or field. C/AL does not provide any way to specify a DateFormula constant. So, all you can do is provide the formula as a string, which is language sensitive unless surrounded by < and > as kriki said.
Btw, CALCDATE takes a text, code or dateformula as its DateExpression parameter.
programmeur-analyste
Cabico Custom Cabinetry
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!