0

I've developed a formula that will convert a date field into the week number.See code below.

CEILING(((  Trial_Account_Date_Created__c  - DATE(YEAR(Trial_Account_Date_Created__c  ), 1, 1) + 1) + 
MOD(DATE(YEAR(Trial_Account_Date_Created__c  ), 1, 1) - DATE(1900, 1, 7), 7)) / 7)

Now what I want to do is to add the text "Week" before the number in the formula. I tried many things but I got stuck.

Please advise,

Darko

  • What is your formula return type? – snehakem Apr 2 '15 at 8:18
  • The formula return type is number. – Darko Todorovski Apr 2 '15 at 8:18
  • Try my answer and let me know if that works – snehakem Apr 2 '15 at 8:20
1

Try below after making the formula return type as "Text",

'Week' + Text(CEILING(((  BirthDate- DATE(YEAR(BirthDate), 1, 1) + 1) + 
MOD(DATE(YEAR(BirthDate), 1, 1) - DATE(1900, 1, 7), 7)) / 7))
| improve this answer | |
  • I already tried that :( Error: Incorrect parameter type for operator '+'. Expected Text, received Number – Darko Todorovski Apr 2 '15 at 8:22
  • Hey i have updated. and it works for me. – snehakem Apr 2 '15 at 8:30
  • Works like a charm. Now i just got a problem with the report to show from Week 1 till Week 52 tried everything seems not working but thats other subject. Thanks you allot for the help :) – Darko Todorovski Apr 2 '15 at 9:01
  • You can think of adding a new question for your above query. I might answer that one too ;) – snehakem Apr 2 '15 at 9:02
  • Here is the link to the question: salesforce.stackexchange.com/questions/71034/… – Darko Todorovski Apr 2 '15 at 9:12
-1
=`"wk"&WEEKNUM(select the cell has the day)`

example: wk25 06/14/15

| improve this answer | |

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.