How would I write a function or a module to tell a month that is displayed in the table as a number to display on the graph as abbreviations such as Oct, Nov, Jan, etc?
How would I write a function or a module to tell a month that is displayed in the table as a number to display on the graph as abbreviations such as Oct, Nov, Jan, etc?
The format command will return the month if you enter a date.
To provide the date if you only have a number, convert the number to a date using the dateserial command. Year(1) and Day(1) numbers are necessary but obsolete.
HTHCode:format(dateserial(1, intmonth, 1),"mmm")
Thanks Guus,
Would that be a public function?
Format and Dateserial are Access build-in functions.
You can use them in a user defined function or in a query:
Where monthfield is the field where the month is stored.Code:select format(dateserial(1, [MonthField], 1),"mmm") as MonthTxt From table1
Enjoy!