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

Compare created and last modified date


I have an requirement for informatica, when the record is created i do not want to push that information into sql so i am writing a formula, when created and lastmodified date are same then formula field should display as 00/00.... but this formula is not working as expected it shows the last modified date in the formula field even though created and last modified are the same:
if(LastModifiedDate <> CreatedDate,LastModifiedDate,DATETIMEVALUE("0000-00-00 00:00:00"))



Created and last modified are same  then display 0000-00-00 00:00:00

When created and last modified are not same then display last modified date


Can anyone help me with this.




Is the return type string or date?


If its text then write:

if(LastModifiedDate <> CreatedDate,TEXT(LastModifiedDate),"0000-0

0-00 00:00:00")


If its datetime then:


if(LastModifiedDate <> CreatedDate,LastModifiedDate,datetime.valueOf("0000-00-00 00:00:00"))