By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,795 Members | 1,242 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,795 IT Pros & Developers. It's quick & easy.

Date Problem

P: n/a
I want to diplay the month in "mmm" format with the input of number.
E.g. If I input 1, it'll display Jan, if I input 2, it'll display
Feb. If I write: format (input_month, "mmm"), it'll always display
Jan, no matter I input 1, 2, 3, ....

Can anyone help?
Feb 5 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
irene wrote:
I want to diplay the month in "mmm" format with the input of number.
E.g. If I input 1, it'll display Jan, if I input 2, it'll display
Feb. If I write: format (input_month, "mmm"), it'll always display
Jan, no matter I input 1, 2, 3, ....

Can anyone help?
You could use a lookup table or you could create a case statement or you
could use dateserial as possible solutions. In the afterupdate event,
using dateserial, you could do something like
If NZ(Me.MonthEntry,0) 0 and NZ(Me.MonthEntry,0) <= 12 then
Me.DisplayMonth = Format(dateserial(2008,Me.MonthEntry,1),"mmm")
Endif

Surf
http://www.youtube.com/watch?v=Z_BNXW1v0uk
Feb 5 '08 #2

P: n/a
On Feb 5, 4:54*pm, irene <irene.lf...@gmail.comwrote:
I want to diplay the month in "mmm" format with the input of number.
E.g. If I input 1, it'll display Jan, if I input 2, it'll display
Feb. *If I write: format (input_month, "mmm"), it'll always display
Jan, no matter I input 1, 2, 3, ....

Can anyone help?
Try the monthname function, e.g.

monthname (input_month) to get the full name of the month
or
monthname (input_month, true) to get the three letter abbreviation.

Feb 6 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.