You need to sign in to do that
Don't have an account?
Tracy Oden 31
how to add a second to a formula date and time field
This should be simple, but I can't figure it out. How do I add a second to a date and time field in a formula? I have a 'end' date and time field. I want my formula field to show 'next' available date and time. The next available should be one second from end date and time.
This might help you.
https://success.salesforce.com/ideaView?id=08730000000BrLJ
There is no way to add seconds to data fields.
The only other way is convert time(Hour:Min:Sec) to seconds and add next onesecond to it and again reconvert to time. But its hectic.
Regards,
Anil
I really wonder what action are you going to perform just one second after the endate ? I mean I already lost close to 120 seconds while writing this answer ;)
Anyway here goes your solution.
To add a second to your Date/time field you need find it's fractional value lby dividing it with the seconds value in 24 hours.
1 second = 1/24*60*60 = 1/86400 = 0.000011
So simple add it to your Date/Time field like this
Hope that helps !
Wrong: 1 second = 1/24*60*60 = 1/86400 = 0.000011
Correct: 1 second = 1/(24*60*60) = 1/86400 = 0.000011