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

3
  • What is your formula return type?
    – snehakem
    Apr 2, 2015 at 8:18
  • The formula return type is number. Apr 2, 2015 at 8:18
  • Try my answer and let me know if that works
    – snehakem
    Apr 2, 2015 at 8:20

2 Answers 2

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))
5
  • I already tried that :( Error: Incorrect parameter type for operator '+'. Expected Text, received Number Apr 2, 2015 at 8:22
  • Hey i have updated. and it works for me.
    – snehakem
    Apr 2, 2015 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 :) Apr 2, 2015 at 9:01
  • You can think of adding a new question for your above query. I might answer that one too ;)
    – snehakem
    Apr 2, 2015 at 9:02
  • Here is the link to the question: salesforce.stackexchange.com/questions/71034/… Apr 2, 2015 at 9:12
-1
=`"wk"&WEEKNUM(select the cell has the day)`

example: wk25 06/14/15

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .