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
cml9cml9 

Need Help with Date Time Formula

What we need is to show the difference between the first Completed Activity and the Opportunity Created Date.

The problem is that the LastActivityDate is a Date field.
Should be like this 
DATETIMEVALUE(LastActivityDate + The Current Hour(of NOW() ))

I have been trying  and reading a lot of post regarding this but it all does not make sense.

Can anyone help me with this?
 
shiva pendemshiva pendem
Hey ,

Please try this 

Text(LastActivityDate) +'The Current Hour ( of '+ Text(Now())+' )'

Thanks,
Shiva
SandhyaSandhya (Salesforce Developers) 
Hi,
 You can use this.
DATETIMEVALUE(TEXT(LastActivityDate ) + TEXT(Now()) + ':00:00')

Hope this helps you!

Thanks and Regards
Sandhya
cml9cml9
Thanks for this but what happen now is that the HOUR from Text Now keeps updating. please see my formula

DATETIMEVALUE(Text( Last_Activity_Logged__c )+ MID(TEXT(Now()), 11, 10) but it keeps updating.. I think what I need now is to have an if but I dont know what will be my condition.

IF( hasActivity__c = TRUE, DATETIMEVALUE(Text( Last_Activity_Logged__c )+ MID(TEXT(Now()), 11, 10)), CreatedDate)

Tried this but same thing happen. Only if I can use isChanged in formula.