Extract of CMonth from Date
shrwetam
Member Posts: 6
Dear All,
May I know how to extract month as a character from Date?
I have used DATE2DMY to extract months as integer by passing 2 as parameter
But how can I get month as APRIL,MAY i.e. as character from date?
e.g if date is 01/04/2009, month is 4
but I need months as 'April'
Thanks
May I know how to extract month as a character from Date?
I have used DATE2DMY to extract months as integer by passing 2 as parameter
But how can I get month as APRIL,MAY i.e. as character from date?
e.g if date is 01/04/2009, month is 4
but I need months as 'April'
Thanks
0
Comments
-
CASE month OF
1:txtMonth:='January';
2:txtMonth:='February';
....................
END;
:whistle:-Mihail- [MCTS]0 -
No way :roll:
Use format(<date>,0,'<month text>').
Use some time to check out the help for the format-property!
Great things are revealed there
With Kind Regards
Thoms Hviid Thorn0 -
Thomas Hviid Thorn wrote:No way :roll:
Use format(<date>,0,'<month text>').
Use some time to check out the help for the format-property!
Great things are revealed there
In which language it is returned, btw? Windows config or client config?
PS: I see i'm not the only who skip the C/SIDE Reference Guide :oops:-Mihail- [MCTS]0 -
Client I guess - never had that as a problem (I allways needed the client language).
But - on you way to the books - check out the Multilanguage sections too
:!: anyway - you'll find, that I'm not allways right in my responses too :-#With Kind Regards
Thoms Hviid Thorn0 -
How about this one:
datDate := TODAY; recDate.RESET; recDate.SETRANGE("Period Type",recDate."Period Type"::Month); recDate.SETRANGE("Period Start",0d,datDate); recDate.FINDLAST; MESSAGE('Monthname <%1>',recDate."Period Name");
[Topic moved from 'NAV 2009' forum to 'NAV/Navision' forum]Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
:-k hmm, I don't see how that's better than
message('%1',format(today,0,'<month text>');
1) four lines of code extra and one variable
2) does the Date table require I/O ? Guess not, but If - that's overhead too
but the result is the same, and it too is multilanguage enabledWith Kind Regards
Thoms Hviid Thorn0 -
1) you can put this code into some library of functions, so you program it only once.
2) No overhead. All is in memory/CPU.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Thanku all
Actually I want to create drill down report for Purchase Receipt Summary report based on Month filteration i.e first screen of Month list & on selection of month-- list of all Receipts-- then on selection of CPL -- goes to actual posted receipt voucher
I got the soultion from post posted by you all0 -
mihail_kolev wrote:Thomas Hviid Thorn wrote:PS: I see i'm not the only who skip the C/SIDE Reference Guide :oops:
I see you also did not read the w1w1term.pdf Terminology Handbook either. :whistle:mihail_kolev wrote:CASE month OF
1:txtMonth:='January';
2:txtMonth:='February';
....................
END;David Singleton0
Categories
- All Categories
- 75 General
- 75 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
