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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MonthName Function 1

Status
Not open for further replies.

epoh

IS-IT--Management
May 8, 2006
73
US
How can I convert the @Beginning_Date (Report Parameter) to a MonthName

I tried the following:

Code:
[COLOR=blue]
"Document Name: " & chr(34) & "Test" & chr(34) & " Document Note: " & chr(34) & 
MonthName({@Beginning_Date},True) & ", " & Year({?@Beginning_Date}) & chr(34)
[/color]

that wont work because "@Beginning_Date" is not a number.

As you can see the date format I am trying to display is

Month, Year
Oct, 2006


How can this be achieved?
 
You can try to convert @Beginning_Date to number see if it will work for you:
MonthName(ToNumber({@Beginning_Date}),True)
 
Try this:
Code:
"Document Name: " & chr(34) & "Test" & chr(34) & " Document Note: " & chr(34) & 
CStr({@Beginning_Date},"MMM") & ", " & CStr({@Beginning_Date},"yyyy") & chr(34)

Bob Suruncle
 
Thanks, Bob. That worked. That is exactly what I needed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top