You need to sign in to do that
Don't have an account?
Salesforce Geek
Subtract one minute from Current time
Hi There,
I’m newbie to Salesforce.
I would like to know the syntax “How to subtract one minute and two minutes from the current time”? I have checked in Datemethods in Apex documentation. No luck found.
Can anyone help?
Thanks
I’m newbie to Salesforce.
I would like to know the syntax “How to subtract one minute and two minutes from the current time”? I have checked in Datemethods in Apex documentation. No luck found.
Can anyone help?
Thanks
This will work:
For 1 minute: NOW() - (1/1440)
For 2 minutes: NOW() - (2/1440)
Thanks,
Pratik
P.S. If this answers you question, please mark it as "Best Answer" so it will help other community members too.
All Answers
This will work:
For 1 minute: NOW() - (1/1440)
For 2 minutes: NOW() - (2/1440)
Thanks,
Pratik
P.S. If this answers you question, please mark it as "Best Answer" so it will help other community members too.
you can try like this for subtracting from minute
or you can try like this if you want to perform the operation with current time
If your problem solved then please mark it as best answer
Thanks
Rishav
It helped me a lot ....!!!!
System.now().addMinutes(-2); // to subtract 2 min