Reply
Contributor
rockymancy
Posts: 4
0

autocaluculation the number of days

I need help autocaluculation the number of days Starting_Date__c is( Date datatype),Period__c is (Formula date datatype). I have created a contact I have given start as Starting_Date__c=1/21/201 its has to caluculte the period as Period__c=1/20/2013.Every months it has to change and it has to continue like this till the contact associated with my Account. ***I have got some code like this**where Month is Picklist Field that why i have used Text method here -------------------------------------------------------------------- DATE(year(Starting_Date__c)+ floor((month(Starting_Date__c) + TEXT(Months__c))/12) + if(and(month(Starting_Date__c)=12,TEXT(Months__c)>=12),-1,0) , if( mod( month(Starting_Date__c) + TEXT(Months__c), 12 ) = 0, 12 , mod( month(Starting_Date__c) + TEXT(Months__c) , 12 )) , min( day(Starting_Date__c), case( max( mod( month(Starting_Date__c) + TEXT(Months__c) , 12 ) , 1), 9,30, 4,30, 6,30, 11,30, 2,28, 31 ) ) ) --------------------------------------------- When i have used this code in the Period Formula field....Its showing an error message on that field(Error: Incorrect parameter type for operator '+'. Expected Number, Date, DateTime, received Text)
Trusted Contributor
@anilbathula@
Posts: 286
0

Re: autocaluculation the number of days

Hi

 

I think ur adding the picklist value to the start date.

use  Value(text(Starting_Date__c) in your formula.

for more info check this:-

http://blogs.developerforce.com/developer-relations/2010/05/i-had-the-pleasure-last-week-of-visiting...

Thanks
Anil.B
Contributor
rockymancy
Posts: 4
0

How to convert the number in Text

I have an Salary custom object.In that i have field called Netpaid:(Currency data type) My question is if Netpaid=4845 Its has to show in like this on my Vfpage(Amount inwords):Four Thousand Eight Hundred and Forty Five Rupees... More i want to convert it PDF... In pdf also it has to reflect