Convert Text Into Month

Z

zyus

I hv text field as below

Month Yr
1 2008
2 2008
3 2008

How to capture the above record as a valid month & year say

Jan-2008
Feb-2008
May-2008

TQ
 
R

Rui

you could use the function MonthName as in:

result = MonthName([Month], True) & "-" & [Yr]
 
K

Krzysztof Pozorek [MVP]

(...)
Month Yr
1 2008
2 2008
3 2008

How to capture the above record as a valid month & year say

Jan-2008
Feb-2008
May-2008


In the query for example, you can write this:

SELECT Format(DateSerial([Yr],[Month],1),"mmm-yyyy") FROM Table1;

K.P.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top