Subtraction of dates

FPoco
Member Posts: 35
Hello
How can I make a subtraction of a date for a filter. I try to make at CALCDATE but not withdraw the expected result
Thanks
How can I make a subtraction of a date for a filter. I try to make at CALCDATE but not withdraw the expected result
Thanks
0
Comments
-
How do you want this to work??
# of days = date1 - date 20 -
I do a filter data by the customer, then I would subtract one year from this filter, to be able to sort a column by the filter of the map and the other column for the result of subtraction of dates0
-
CALCDATE should work fine for your scenario.
YourFilteringDate := TODAY; ExpectedResultDate := CALCDATE('-1Y', YourFilteringDate); MESSAGE('%1', ExpectedResultDate);
Navision noob....0 -
This works but what I needed even now was to use the filter that I use in the report and then make calcdate0
-
did you try changing TODAY to your date variable?0
-
NaviDev wrote:CALCDATE should work fine for your scenario.
YourFilteringDate := TODAY; ExpectedResultDate := CALCDATE('-1Y', YourFilteringDate); MESSAGE('%1', ExpectedResultDate);
Otherwise if you work in another language, it might be that 'Y' has no sense and thus gives an error.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Hello,
I've a similar problem.
A table has a starter and an ending date.
I need to insert a new column to calculate the remaining days. So the task sounds very simply, but when I saw the CALCDATE in the Help I said myself: oh my God... what a difficult it is.
Can anyone help me in this?
I would need the formula that operates the substraction.0 -
Hm...
I played a little with the fields.
I created an Integer variable in the C/AL Globals.
Then I typed this: newdate := endingDate - startingDate;
And it seems it works. I get the result of the substraction in days0 -
Cobbler wrote:Hm...
I played a little with the fields.
I created an Integer variable in the C/AL Globals.
Then I typed this: newdate := endingDate - startingDate;
And it seems it works. I get the result of the substraction in daysRegards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions