I'm trying to complete this IF statement where IF DATE CREATED is earlier than 31 December, 2017, THAN input CCEA-17-ID#; OTHERWISE input CCEA-18-ID#.

Currently, this code: =IF([DATE CREATED]<="December 31, 2017",("CCEA-17-"&[Submission ID#]+147)) doesn't get an error, but "CCEA-17-ID# is input regardless of date.

=IF([DATE CREATED]<="December 31, 2017",("CCEA-17-"&[Submission ID#]+147),("CCEA-18-"&[Submission ID#]+147)) IT ERRORS OUT


This is because you are trying to compare string with a date. Also, you have a false part missing from your condition. Try this, important thing is Date function:

=IF([DATE CREATED]<= Date(2017,12,31),("CCEA-17-"&[Submission ID#]+147),("CCEA-18-"&[Submission ID#]+147)
  • Adding the Date function fixed the problem. However, it does not work on other days, unless I modify (OK) the Calculated Column, everyday. This is a short term fix, how do we get a long term fix? – Dave McEwan Jan 31 '18 at 14:21
  • What do you mean by 'other days'? If you are trying to do something with Today's date remember calculated column only works when you add/modify item. – SharePointer Jan 31 '18 at 21:00
  • By other days, I mean a different day other than the one it was created. Today isn't part of the code, so I didn't think it would effect it. Is there a different way of getting this accomplished and not have to add/modify the item every day? – Dave McEwan Jan 31 '18 at 21:07
  • Considering you are on the SharePoint Online you can use MS Flow. It would be much easier and better. – SharePointer Jan 31 '18 at 21:27
  • I apologize, I'm on SP Server, not online – Dave McEwan Feb 1 '18 at 15:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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