+ Start a Discussion
Del_SantosDel_Santos 

Adding hours in a NOW() function

Hi,

 

Is there a way we can add a time to now()?

 

My present time is 4/26/2011 6:43 PM.

I have a text formula as "TEXT(NOW())", but I am getting a result of "2011-04-26 10:43:51Z" which is 8 hours late hence i would like to add 8hours to my formula.

 

Also, is it possible to format the result exactly the same as "4/26/2011 6:43 PM"?

 

Thanks a lot.

 

Del

                         

Best Answer chosen by Admin (Salesforce Developers) 
SteveMo__cSteveMo__c

Here you go

 

NOW() + 0.04167

 

So for you it would be: (0.04167 * 8)

 

 

NOW() + 0.33336

 

 

 

 

 

 

 

All Answers

goabhigogoabhigo

Try setting the time zone(in Company Profile) to your current location.

SteveMo__cSteveMo__c

1 hour  = 0.04167 Days, so add or subtract 0.04167 x the number of hours you need to adjust for Local Time. 

SteveMo__cSteveMo__c

Here you go

 

NOW() + 0.04167

 

So for you it would be: (0.04167 * 8)

 

 

NOW() + 0.33336

 

 

 

 

 

 

 

This was selected as the best answer
Del_SantosDel_Santos

Thanks man!!! :smileyvery-happy:

Del_SantosDel_Santos

Hi Stevemo,

 

Is there a way I can format the result as this "4/26/2011 6:43 PM"?

 

Thanks,

Del

Muskan DuaMuskan Dua
Vist now for the best water damage service (http://water-damage.services) provider in USA.
kanusha badshakanusha badsha
This is very smart, really an intelligent idea. This is my first time in your blog and I really love it. Thanks for this awesome post,,,, kindly read

MovieRulz (https://note-mania.com/movierulz-movies-download/)
Greatandhra.com (https://note-mania.com/greatandhra/)
Etrain Indian Railways (https://note-mania.com/etrain/)
IRCTC Next Generation (https://note-mania.com/irctc-next-generation-e-ticketing-system/)
Exam GuruExam Guru
yes you can add time by doing hard work Samagra Portal ID (https://yogivemanauniv.in/samagra-portal-id-by-name-sssm-nic-in/)
Also get the details information regarding pfms.nic.in list 2020 (https://yogivemanauniv.in/pfms-nic-in-list-payment-scholarship/)
Download AP Bharathi Scheme Status
check now.
vpn modvpn mod
Yes, It was right. grab this https://vpndudes.com/anonytun-mod-apk/ and let us know.
Niraj Kumar 134Niraj Kumar 134
Bihar Vridha Pension List Check Online is very simple.
Only You have to visit to SSPMIS Bihar Official Website and click on Beneficiary Status.
Then enter some Basic Details New Bihar Vridha Pension List will appear on you screen. Thank You