Date Filter values
petevans
Member Posts: 78
You can put the following into a date flowfilter:
T = Today
Y = This Year
T-1 = Yesterday
Y-1 = Last Year
Y+1 = Next Year
etc.
A, M and C all translate into dates as well, but I am not clear which.
Does anyone have an overview of the available commands (Letters and valid operators) for date flowfilters, or could point me towards some documentation? So far my search has been fruitless.
Cheers.
T = Today
Y = This Year
T-1 = Yesterday
Y-1 = Last Year
Y+1 = Next Year
etc.
A, M and C all translate into dates as well, but I am not clear which.
Does anyone have an overview of the available commands (Letters and valid operators) for date flowfilters, or could point me towards some documentation? So far my search has been fruitless.
Cheers.
NAVN00b
0
Comments
-
The date expression can be any length. The string is interpreted from left to right with one subexpression at a time. The following rules describe the valid syntax of date expressions:
DateExpression = [<SubExpression>][<SubExpression>][<SubExpression>]
<SubExpression> = [<Sign>] <Term>
<Sign> = + | -
<Term> = <Number><Unit> | <Unit><Number> | <Prefix><Unit>
<Number> = Positive integer
<Unit> = D | WD | W | M | Q | Y (D=day, WD=weekday, W=week, M=month, Q=quarter, Y=year)
<Prefix> = C (C=current)
These production rules show that date expressions consist of zero, one, two, or three subexpressions. Each subexpression comprises an optional sign and a term. The following are some typical examples of terms:
30D (30 days; corresponds to <Number><Unit>)
WD2 (weekday number 2; corresponds to <Unit><Number>)
CW (current week; corresponds to <Prefix><Unit>)
The internal calendar of C/SIDE starts on Monday and ends on Sunday. This means that Monday is weekday 1 and Sunday is weekday 7.
A run-time error occurs if the syntax of DateExpression is incorrect.0 -
Hello and thanks for your reply.
I am not getting some of the commands you listed to work.
CW, 30D, D, to name some - all yield "<expression> is not a valid date" when I enter them in a date flowfilter in a table.
Some of them work though, like T (Today) and Y (Translates into 01.01.10..31.12.10).
I understand this is language dependent though, and my results listed above are in ENU (English (USA)). When I change to Norwegian, D does work, and replaces T as today's date.
I am still a bit confused. CW would have been a great command for my purposes, especially if I could use -CW (Last week) as well.NAVN00b0 -
Lookup CALCDATE or DateFormula in the NAV Help Menus. You should find your language dependent commands there.0
-
There are two different topics being discussed here.
One is the C/AL function CALCDATE and how to build up a Calcdate formula.
The second is Date SHORTCUT keys these are hortcuts that can be used in the Client interface to indicate a specific date that can be used.
It is purely coincidence that some of the symbols used are valid in both, even though they may mean something else.
For example, in Calc date, Friday is indicated as WD5 but the shortcut for Friday in a date field is F
On top of this there is a bug in the shortcuts, where in the STX file letters were used twice, such as T. So T can mean Today or Tuesday and W can mean Wednesday or Workdate. To complicate this even further, the W T issue is interpreted differently between T.. and >=T (can't remember which is which, but one uses Today and one Tuesday), same with W.
Actually this one is great because you normally get a call on a Wednesday where the customer says "But T worked yesterday as today but doesn't work today (because actually it was Tuesday).
In fact they STX compiler should giv an error when it finds language clashes like this. Days of the week should use two or three letters Mo,Tu,We or MOn, Tue, Wed, to avoid this issue.David Singleton0 -
petevans wrote:You can put the following into a date flowfilter:
T = Today
Y = This Year
T-1 = Yesterday
Y-1 = Last Year
Y+1 = Next Year
etc.
A, M and C all translate into dates as well, but I am not clear which.
Does anyone have an overview of the available commands (Letters and valid operators) for date flowfilters, or could point me towards some documentation? So far my search has been fruitless.
Cheers.
So lets answer your actual question.
(assuming English STX file)
T = Today
W =Workdate
P = Accounting Period
Q = Quarter
Y = Year
M = Month
C= Closing
A I have no idea what that is. It might be a local language thing.David Singleton0 -
David Singleton wrote:T = Today
W =Workdate
P = Accounting Period
Q = Quarter
Y = Year
M = Month
C= Closing
Has anyone else ever noticed the bug every once in a while that entering T in a date field returns Tuesday's date (when it's not Tuesday), and not the system date? I see it every once and a while and it aggravates me haha. Just curious if anyone else has ever seen it
Lavin-Lavin
"Profanity is the one language all programmers know best."0 -
klavin wrote:David Singleton wrote:T = Today
W =Workdate
P = Accounting Period
Q = Quarter
Y = Year
M = Month
C= Closing
Has anyone else ever noticed the bug every once in a while that entering T in a date field returns Tuesday's date (when it's not Tuesday), and not the system date? I see it every once and a while and it aggravates me haha. Just curious if anyone else has ever seen it
Lavin
Sometimes T=Thursday. I think its like entering the years, eg 89 = 1989 22 = 2022 so there is a cut off some how.
As I said it should need at least two letters to enter a day that would make it easierDavid Singleton0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 328 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


