Is it possible in navision to retreive the month name from a date.
For instance, I have the date 22/12/2005, I would like to copy 'december' in a variable.
Now we know how he gets that high number of postings:
1. He writes a message giving just a hint
2. He writes a message giving an extract from the on-line help
3. He writes a message giving you the solution
So he writes 3 messages, instead of 1
No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
Is it possible in navision to retreive the month name from a date.
For instance, I have the date 22/12/2005, I would like to copy 'december' in a variable.
Thanks.
Another possibility is to use the Date-virtual table
recDate of recpord-type Date
Another possibility is to use the Date-virtual table
Yeah, sure, and there is another possibility to write an OCX in assembly language that queries data from the observatory in Greenwich over the internet and guesses the current month from the status of the stars, and I am sure there are whole lot of other possibilities but isn't it simpler to just use FORMAT?
Date table is basically for matrix forms of the usual 1/7/31/12 etc. buttons, not very handy for determining current date and such...
Do It Yourself is they key. Standard code might work - your code surely works.
Date table is basically for matrix forms of the usual 1/7/31/12 etc. buttons, not very handy for determining current date and such...
Yes but it can also be used like this, and actually I do use it like this because after all these years with Navision, I still haven't understood the FORMAT-parameters. :oops:
And I am not trying anymore since a few years, because I created my own functions to format numbers and dates with a format that is a lot easier to understand.
BTW : I would also like to see an example of that OCX =P~
Regards,Alain Krikilion No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Comments
Format
Example
<Closing><Day,2>-<Month,2>-<Year>
0
05-04-03
<Closing><Day,2>-<Month,2>-<Year>
1
05-04-03
<Day,2><Month,2><Year><Closing>D
2
050403D
<Closing><Year>-<Month,2>-<Day,2>
3
03-04-05
<Closing><Day>. <Month Text> <Year4>
4
5. April 2003
<Closing><Day,2><Month,2><Year>
5
050403
<Closing><Year><Month,2><Day,2>
6
030405
<Day,2><Filler Character, >. <Month Text,3> <Year4>
7
5. Apr 2003
The following table below shows how these formats will change if the Regional and Language Options is set to "United States."
US Date
Format
Example
<Closing><Month,2>/<Day,2>/<Year>
0
04/05/03
<Closing><Month,2>/<Day,2>/<Year>
1
04/05/03
<Month,2><Day,2><Year><Closing>D
2
040503D
<Closing><Year>/<Month,2>/<Day,2>
3
03/04/05
<Month Text> <Closing><Day>, <Year4>
4
April 5, 2003
<Closing><Month,2><Day,2><Year>
5
040503
<Closing><Year><Month,2><Day,2>
6
030504
is the solution... ;-)
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Guess I should have taken more time for this post. :oops:
But somtimes it is more educational to puzzle your way out... O:)
Now we know how he gets that high number of postings:
1. He writes a message giving just a hint
2. He writes a message giving an extract from the on-line help
3. He writes a message giving you the solution
So he writes 3 messages, instead of 1
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
RIS Plus, LLC
Merry Xmas. 8)
That was in the help, I should read it carefully next time... :oops:
Thx anyway... :!:
recDate of recpord-type Date
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Yeah, sure, and there is another possibility to write an OCX in assembly language that queries data from the observatory in Greenwich over the internet and guesses the current month from the status of the stars, and I am sure there are whole lot of other possibilities but isn't it simpler to just use FORMAT?
Date table is basically for matrix forms of the usual 1/7/31/12 etc. buttons, not very handy for determining current date and such...
Do It Yourself is they key. Standard code might work - your code surely works.
And I am not trying anymore since a few years, because I created my own functions to format numbers and dates with a format that is a lot easier to understand.
BTW : I would also like to see an example of that OCX =P~
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
I have done this for date name by creating the codeunit.
Name DataType Subtype Length
DateTable Record Date
InpDate Date
InpDate := TODAY;
DateTable.GET(DateTable."Period Type"::Date,InpDate);
MESSAGE(DateTable."Period Name");
and change like this for your requirement...
Thanks,
Rajasekar