Link to home
Create AccountLog in
Avatar of Matt Pinkston
Matt Pinkston

asked on

Using SPD 2007 trying to get MMM - YYYY out of date

In a calculated field, I am trying to convert a date field [Report Date] to MMM - YYYY was thinking this would work but I am getting an error.
 
=TEXT([Report Date];"mmmm")&" - "&TEXT([Report Date];"yyyy")
 
I even tried just =TEXT([Report Date];"mmm")

The formula contains a syntax error or is not supported.  

Is there a place online that gives all the options for calculated fields and how to do....

Thanks
Avatar of Rainer Jeschor
Rainer Jeschor
Flag of Germany image

Hi,

this formula for the calculated field should do the trick:
=IF(ISBLANK([Report Date]),"",TEXT(DATE(YEAR([Report Date]),MONTH([Report Date]),1),"mmm-yyyy"))

Open in new window


Sorry, I have no MOSS2007 at hand to verify for 100% but at least it works on SharePoint 2010.

Sample formulas:
http://msdn.microsoft.com/en-us/library/bb862071(v=office.12).aspx
http://office.microsoft.com/en-001/windows-sharepoint-services-help/examples-of-common-formulas-HA001160947.aspx

HTH
Rainer
ASKER CERTIFIED SOLUTION
Avatar of Rainer Jeschor
Rainer Jeschor
Flag of Germany image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer