3

I have records that are modified each month. The site is used to display the previous month's information. However, to make sure that the information is correct, I want to use the date the information is modified as the original date and retrieve the month prior to that date. Eventually I want to use the previous month to format the label dynamically.

For example, if the records are updated on March 10, 2013, I would be displaying the data from February so I want the label to say "February 2013."

Any assistance is greatly appreciated!

1 Answer 1

2

It's going to be a great, big messy calculated column, but it can be done. There's probably better ways to do this but nothing I know how to do offhand.

New calculated column, type of Single Line of Text (String):

=IF(MONTH([MyRecordUpdated])=1, "December "&YEAR([MyRecordUpdated])-1,
IF(MONTH([MyRecordUpdated])=2, "January "&YEAR([MyRecordUpdated]),
IF(MONTH([MyRecordUpdated])=3, "February "&YEAR([MyRecordUpdated]),
IF(MONTH([MyRecordUpdated])=4, "March "&YEAR([MyRecordUpdated]),
IF(MONTH([MyRecordUpdated])=5, "April "&YEAR([MyRecordUpdated]),
IF(MONTH([MyRecordUpdated])=6, "May "&YEAR([MyRecordUpdated]),
IF(MONTH([MyRecordUpdated])=7, "June "&YEAR([MyRecordUpdated]),
IF(MONTH([MyRecordUpdated])=8, "July "&YEAR([MyRecordUpdated]),
IF(MONTH([MyRecordUpdated])=9, "August "&YEAR([MyRecordUpdated]),
IF(MONTH([MyRecordUpdated])=10, "September "&YEAR([MyRecordUpdated]),
IF(MONTH([MyRecordUpdated])=11, "October "&YEAR([MyRecordUpdated]),
"November "&YEAR([MyRecordUpdated]))))))))))))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.