Format calculated field (1 Viewer)

Herosoft

New member
Local time
Today, 17:56
Joined
Oct 6, 2012
Messages
5
Hi!

I have a select query with a date field in it, let's say a birthdate, and I want to show the field a second time, but then with the name of the month in full characters.
So I made a calculated field in a new column: 'monthname: Month([birthdate])', and it shows the number of the month correctly (ex. '8' for August).
But when I type 'mmmm' in the 'format' property of the calculated field, the recordset always shows 'January' whatever the month really is.
I tried to modify the calculated field in 'monthname: Format(Month([birthdate]);"mmmm"', but this gives the same faulty result as well.

How can I obtain a valid result?

Thanks for your answer, Roger.
 

AlexHedley

Registered User.
Local time
Today, 16:56
Joined
Aug 28, 2012
Messages
171
Code:
MonthName ( number, [abbreviate] )

Code:
Month ( date_value )

Join them together:
Code:
MonthName ( Month ( date_value ), [abbreviate] )

Replace with your Field
Code:
MonthName ( Month ( [Birthdate] ) )
 

AlexHedley

Registered User.
Local time
Today, 16:56
Joined
Aug 28, 2012
Messages
171
Also your Format looks incorrect

Code:
'monthname: Format(Month();"mmmm"'

Change the ; to ,
Code:
monthnameX: Format([birthdate], "mmmm")
 

Herosoft

New member
Local time
Today, 17:56
Joined
Oct 6, 2012
Messages
5
Alex,

Thank you very much for your answer, the 'monthname' function works perfectly! One remark about the semi-colon: since I live in Belgium and use azerty keyboard, it is mandatory throughout all Office functions to use semicolons instead of comma's, which do not work here :-/ Roger.

To Mihael:
"mmm" did not work either, it showed 'jan' instead of the correct month (aug)
 

AlexHedley

Registered User.
Local time
Today, 16:56
Joined
Aug 28, 2012
Messages
171
Great to hear it's working.

Thanks for letting me know about the ; localisation, I wasn't aware of that.
 

Users who are viewing this thread

Top Bottom