function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
gautamgautam 

Createddate in formula

Hi All,

 

I am trying to write a formula

 

if(( CreatedDate > 2005-10-08T01:02:03Z),name,'fail')

 

but its not working..giving the error "Syntax error. Missing ')'  ".

 

Can anyone help me where i am going wrong ?

Best Answer chosen by Admin (Salesforce Developers) 
gautamgautam

Thanks...

It is actually

if((datevalue(createddate)>date(2010,10,23)), name,"fail")

All Answers

SporterSporter

Is there any way you could use a field instead of the actual date time value and if not you will need to remove the time stamp as it is picking up on the : and perceiveing it as another value and then asking for a another bracket.

 

b-Forceb-Force

here is your formula

 

IF((CreatedDate > DATE(2005,10,8)  ), Name, "Fail")

This is syntax  free formula

 

Please make sure that CreatedDate field is available for formula field

 

Hope this will help you

 

Thanks,

Bala

 

 

gautamgautam

Thanks...

It is actually

if((datevalue(createddate)>date(2010,10,23)), name,"fail")

This was selected as the best answer
b-Forceb-Force

Gautam,

Do you think formula that I provide has any issue :)

 

Thanks,

Bala