Hello everyone,
I have in my report this code: = Month(Now()).
This code shows only the number of the month so, for example: September = 9.
But I want the report to show "September".
How can I do this?
Hello everyone,
I have in my report this code: = Month(Now()).
This code shows only the number of the month so, for example: September = 9.
But I want the report to show "September".
How can I do this?
Look at the Format() function
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba
if i put "mmmm" into the Format function it shows me January but i want the current month.
So use the current date?
However Now() should work just as well?
So I have no idea what your are using?Code:? format(now(),"mmmm") September![]()
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba
OP is using the result of MONTH(Now()), i.e. in September it will be 9. And when OP uses this result with FORMAT, he/she formats 9th January 1900 as month, what of-course is returning "January"!
For OP: In Access and in Excel, dates are integers starting from 01.01.1900. Decimal parts of any date value are time values (hours, minutes and seconds) of this date. I.e. 1.5 is same as 01.01.1900 12:00, 2.75 is same as 02.01.1900 18:00, etc.
MonthName(Month(now))
will work without format function.
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba
A good route to take for sure.Personally I would go with the option with the least functions.
I haven't access to MS Office at moment to test it, but how about having a control on report with formula =NOW() as source, and the control formatted as "mmmm"?
Trying to imagine why I'd want this on a report that when I run it on 10/31/2022 the calc shows October, but I run the same report the next day and it shows November.- especially if the records contain a date. If the month info is for data, the date ought to be in the data, but I guess that doesn't matter here for some reason.
A control formatted as mmmm with source as Now() would work also.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.