Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format Month Number

Status
Not open for further replies.

Brandos

Technical User
Apr 7, 2001
4
GB

I have a database with a Time dimension that has an attribute of month number in the year (eg "3" for all dates in March). I want to display this as a date, not a number (ie as "Mar"). This sounds really easy I know, but I can't work out how to do it. Thanks in advance for any help!
 
Well I guess you already tried the Month() function to get the string corresponding to a month. But if I'm right you are only dealing with a month number not the entire date. So I think you'll have to use a temporary date to get the month string. Just create a new variable and put this formula into it :
"=ToDate(MonthVar & "/01/2000","m/d/yyyy")"

(You will eventually have to convert the MonthVar to a string.)

Now you just have to use the fuction Month() with your new variable.

e.g : Month(NewVar)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top