Is there any way to return the datepart in CAL similar to how it can be done in SQL. I need to put something together that provides information on the earlier part of the week but need to somehow recognise from the date the user puts in what day of the week it is eg. If it is a Thursday i need to populate information for Monday, Tuesday and Wednesday. Is this too ambitious or would i be better to write it in SQL and import it into a Navision table?? Any help would be appreciated.
0
Comments
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
BTW : "recDate" is a table on virtual table "Date".
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
recDate.SETCURRENTKEY("Date Type","Period Start");
recDate.SETRANGE("Date Type",recDate.Date Type"::Week);
I return an error saying i have specified an unknown variable "Date Type". I ran the table Date to see what fields it has in it but "Date Type" is not there. I'm not sure you mean that "Date Type" is a field but i am stuck. At the moment if i put in 21/07/07 i get the message Monday has date 01/01/06. I do really appreciate your help.
There are some fields:
"Period Type" : option (the first field of the primary key)
"Period Start" : date (the second field of the primary key)
"Period End" : date
"Period No." : integer
"Period Name" : text
It is possible the table and the fields have been translated.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Is solution for you!
(CW = current week, <> is used to have it multilanguage enabled)
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.