Date Error

navimbs
Member Posts: 137
Not a valid date....."GLBudgetEntry.SETRANGE(Date,0D,12319999D);"
What is the correct format?
What is the correct format?
0
Comments
-
change the code to this
GLBudgetEntry.SETRANGE(Date);
that way there is not filter.0 -
12319999, that's December 31st of the year 9999, I don't think NAV's calendar goes quite that far. Try 2099 or something a little closer than 9999.
Oh and if your goal is to remove the date filter, then follow Rashed's advice.0 -
navimbs wrote:Not a valid date....."GLBudgetEntry.SETRANGE(Date,0D,12319999D);"
What is the correct format?
Isn't itGLBudgetEntry.SETRANGE(Date,01010001D,12319999D);
But really Ahmed's suggestion is the correct one.David Singleton0 -
the best one is
GLBudgetEntry.SETRANGE(Date)
but the correct one must beGLBudgetEntry.SETRANGE(Date,0D,31129999D);
0 -
Hi Guys,
Thanks a lot for your inputs....!!!
I tried GLBudgetEntry.SETRANGE(Date,0D,31129999D);
I think for NAV 4.0 SP3, the date format Month-Date-Year works.
This works perfectly fine.
Thanks a million to all u guys!!!!!!!
0 -
I tested in 2.60 and 3.60 and the format seems to correspond to the Windows country settings???
If that's really true:
:evil:
](*,)
:sick:0 -
So better always use my way:
GLBudgetEntry.SETRANGE(Date,0D,DMY2DATE(31,12,9999));
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
PeterD wrote:I tested in 2.60 and 3.60 and the format seems to correspond to the Windows country settings???
If that's really true:
:evil:
](*,)
:sick:
this is from the Navision help:Entering Dates
How you enter dates depends on the settings that have been selected in the Regional Options window in the Windows Control Panel. You can enter dates with or without separators.Torsten
MCP+I, MCSE NT, Navision MCT (2004,2005)0 -
@Kriki
I will use your way from now on.
@Todro
The help for this is for a user and not for a developer. The application designers guide:date constant A date constant is written as six or eight digits followed by
the letter "D" (the date constant expressing "undefined date" is, however,
entered as "0D"). The digits specify the date in the format MMDDYY or
MMDDYYYY.0 -
-
PeterD wrote:@Todro
The help for this is for a user and not for a developer. The application designers guide:date constant A date constant is written as six or eight digits followed by
the letter "D" (the date constant expressing "undefined date" is, however,
entered as "0D"). The digits specify the date in the format MMDDYY or
MMDDYYYY.You are right with the documentation but as this never (at least back to version 1.3) worked differently in the past versions, I consider the ADG being wrong.
Everytime you work in a different regional settings environment, you will see that navision is changing the text constants. I treat this as expected behaviourTorsten
MCP+I, MCSE NT, Navision MCT (2004,2005)0 -
todro wrote:...You are right with the documentation but as this never (at least back to version 1.3) worked differently in the past versions, I consider the ADG being wrong.
Everytime you work in a different regional settings environment, you will see that navision is changing the text constants. I treat this as expected behaviour
Well they ixed the CALCDATE forumual with a good solution. Personally I would like to see something like:
<20070828D>
as the constant in the editor.
I remember back when I did my first Navision implementation in Hungary, and my first reaction was "Hey this country got the dates right".David Singleton0 -
David Singleton wrote:todro wrote:...You are right with the documentation but as this never (at least back to version 1.3) worked differently in the past versions, I consider the ADG being wrong.
Everytime you work in a different regional settings environment, you will see that navision is changing the text constants. I treat this as expected behaviour
Well they ixed the CALCDATE forumual with a good solution. Personally I would like to see something like:
<20070828D>
as the constant in the editor.
I remember back when I did my first Navision implementation in Hungary, and my first reaction was "Hey this country got the dates right".Torsten
MCP+I, MCSE NT, Navision MCT (2004,2005)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