calculate last years date..based on user entered date
nbangaza
Member Posts: 30
Hi All ,
On a report, when a user enters a start date e.g. 25/03/10 and an end date 30/06/10 i want to be able to return the previous year's orders for them. e.g. (last year start date)25/03/09 and (last year end date) 30/06/09.
how do i go about finding the preivous year's date?
On a report, when a user enters a start date e.g. 25/03/10 and an end date 30/06/10 i want to be able to return the previous year's orders for them. e.g. (last year start date)25/03/09 and (last year end date) 30/06/09.
how do i go about finding the preivous year's date?
0
Comments
-
hi,
I think CalcDate function may be helpful to you.Regards,
Hemant
They can conquer who believe they can.0 -
i tried using calcdate..but the syntax i used caused compiling errors..i dont know what syntax to use0
-
Use
lastdate:=('-1Y',startdate)Regards,
Hemant
They can conquer who believe they can.0 -
Click on the Help menu, and select "C/SIDE Reference Guide". This will give you access to all the syntax explanations you will ever need.
Another way to get the right help is to open the C/AL editor, open the C/AL Symbol Menu (press F5), browse down to SYSTEM on the left side, then to 'Date' in the middle, then CALCDATE on the right, and then hit F1.0 -
Please Try
CalcDate('<-1Y>',startDate);
If you use the '<' and '>' the Calcdate will use the English date calculation.
Otherwise it will use the local translated to the client language Calcdate abbreviations.
Like '<1Y>' in English will translate into '1J' in Dutch.
Hope this helps,
WillyFostering a homeless, abused child is the hardest yet most rewarding thing I have ever done.0 -
DenSter wrote:Click on the Help menu, and select "C/SIDE Reference Guide". This will give you access to all the syntax explanations you will ever need.
Another way to get the right help is to open the C/AL editor, open the C/AL Symbol Menu (press F5), browse down to SYSTEM on the left side, then to 'Date' in the middle, then CALCDATE on the right, and then hit F1.
Teach a man to fish. :thumbsup:David Singleton0 -
Damn straight, too bad most people these days only seem to want deep fried fish nuggets, handed to them, on a plate, with sauce on the side, a fork and a napkinDavid Singleton wrote:Teach a man to fish. :thumbsup:
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
- 322 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

