How Do I Retrieve the Name of the Month of a Given Day? (Magic xpa 4.x)
It can be very difficult to figure out what month a given date falls in, and more work to translate it into text. There is a nice function to do this though, the CMonth() function.
One of the advantages of using this function is that if your application is being distributed in other countries, it will return the name of the month in the user’s chosen language.
Hint: If you need to do computations based on the month, it is better to use a different function, Month(). This returns the month number rather than the name, which is easier to use in programs.
The syntax of CMonth() is:
CMonth(date)
Where date is any date variable (or a hard-coded date, such as '05/06/2008'DATE, or an expression that evaluates to a date). It returns a string containing the name of the month.
How Do I Calculate the Day/Month/Year Portion of a Given Date Value?
The Online and Rich Client Samples projects (program DT13 and RDT13)