how to check item validity based on the startdat and enddate

Chowdary
Member Posts: 148
Hi All,
Thanks to sepnd few munites of your valuable time.
I am developing Sales Price Report based on Sales Price Table(Customized) and Item table.
I have created temp table to get data from both of the above tables based on the filters by users.
Filters: Profit centre, StartDate, EndDate
Now, the problem is Item has validity from StartingDate to EndingDate.
I need to get all the item valid with in the [StartDate, EndDate] (not StartingDate to EndingDate).
Ex:
Item StartingDate EndingDate
Item1 010110 311210
if user selected StartDate:011010 EndDate:311010 then Item1 is Valid and need to display.(because in range 010110 311210)
if user selected StartDate:011109 EndDate:311010 then Item1 is Valid and shouldn't display.(because out of range)
How to do this? ](*,)
Any ideas would be greatly
Pleasure in the job puts perfection in the work
0
Comments
-
Well, if the start date entered by the user is less than the start date in the table it shouldn't be used.
IF UserStartDate < TableStartDate THEN
SKIP
Same thing with the End Date, but it is greater than instead of less than.
If it passes both of those conditions then you know the start date is between the two dates and so it the end date.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