cancel
Showing results for 
Search instead for 
Did you mean: 

How to use an SFM Formula to set a Date Time field to 2 hours later

Highlighted
Line Chef
Line Chef

How to use an SFM Formula to set a Date Time field to 2 hours later

Looking for a way to use Formula to set the value of a Date Time field to be 2 hours later than another Date Time field. Cannot find any examples for this in Help docs.

Tags (2)
0 Likes
Reply
Highlighted
Line Chef
Line Chef

User Reply How to use an SFM Formula to set a Date Time field to 2 hours later sean16416

@shivaranjini_g, Can you recommend a method using Formula to reference a Date Time field and add 2 hours (or some amount og time) to the time portion and set the Target field (of Date Time data type) to this value? 

0 Likes
Reply
Highlighted
Product Team
Product Team

User Reply How to use an SFM Formula to set a Date Time field to 2 hours later shivaranjini_g

@sean16416 Nothing we have for now. We support at increment at day level, nothing below it.  what is the usecase where admin wants the time to be auto incremented ?

or increment and set the new field with another field value

0 Likes
Reply
Highlighted
Line Chef
Line Chef

User Reply How to use an SFM Formula to set a Date Time field to 2 hours later devans22

@sean16416 You mentioned it is possible to increment by a day.  How is this done in an SFM Formula?

0 Likes
Reply
Highlighted
Product Team
Product Team

User Reply How to use an SFM Formula to set a Date Time field to 2 hours later shivaranjini_g

@sean16416  Sample here, incrementing day by 1 and forming the date:

$F.DATE($F.YEAR($D.Work_Order.Date1__c),$F.MONTH($D.Work_Order.Date1__c),$F.DAY($D.Work_Order.Date1__c)+1)

0 Likes
Reply
Highlighted
Line Chef
Line Chef

User Reply How to use an SFM Formula to set a Date Time field to 2 hours later devans22

Thanks

0 Likes
Reply
Highlighted
Line Chef
Line Chef

User Reply How to use an SFM Formula to set a Date Time field to 2 hours later devans22

I had seen that in the manual but was not sure if it would work on the last day of the month?

0 Likes
Reply
Highlighted
Product Team
Product Team

User Reply How to use an SFM Formula to set a Date Time field to 2 hours later shivaranjini_g

There is a limitation, If the day formed is not correct then it shows null

0 Likes
Reply
Highlighted
Line Chef
Line Chef

User Reply How to use an SFM Formula to set a Date Time field to 2 hours later devans22

That is what I saw as well.  I hoped Today() + 1 might work but it added 19 days.

0 Likes
Reply