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
Tracy Oden 41Tracy Oden 41 

How to add minutes to date time field

I woud like to simply add 15 minutes to a date and time field. How can I do this?
Best Answer chosen by Tracy Oden 41
Devi ChandrikaDevi Chandrika (Salesforce Developers) 
Hi tracy,

Try this way.
Yourdate_time__c +( 15/1440)

Hope this helps you
Let me know if this helps you. Kindly mark it as solved so that it may help others in future.

Thanks and Regards
 

All Answers

Andrew GAndrew G
Do we assume you are meaning for a formula field?

Date_Time_Field__c + 15/60/24


If you mean you want to increment an editable date time field, then you need to go to a PB.

You could then use the same formula to increment the date time field.


Regards
Andrew
Devi ChandrikaDevi Chandrika (Salesforce Developers) 
Hi tracy,

Try this way.
Yourdate_time__c +( 15/1440)

Hope this helps you
Let me know if this helps you. Kindly mark it as solved so that it may help others in future.

Thanks and Regards
 
This was selected as the best answer
Ankitbhai DarjiAnkitbhai Darji

DATETIMEVALUE(
  TEXT(
    DATETIMEVALUE(TEXT({!YourDateTimeVariable}))
    + ((FLOOR(VALUE(LEFT({!VariableinMinutes},2)))) / (24*60))
  )
)

variableinMinutes like "15 mins" 

like this way i did in my task to add value dynamically in to my datetime variable 

chandrika hatti 9chandrika hatti 9
How can you achieve it in Formula field?