You need to sign in to do that
Don't have an account?
![Tyler Turner Tyler Turner](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
How to extract hour from datetime field
Hello,
I'm trying to get the hour of day in EST from the Date/Time Opened field. I found two other posts around this and neither formula worked from those so I'm looking for help. Just need a simple number output for the hour of the day.
Thanks!
I'm trying to get the hour of day in EST from the Date/Time Opened field. I found two other posts around this and neither formula worked from those so I'm looking for help. Just need a simple number output for the hour of the day.
Thanks!
Try below formula.
https://developer.salesforce.com/forums/?id=9062I000000BngFQAS
Please mark as Best Answer if above information was helpful.
Thanks,
For Apex you can use the fieldName.hours() to get the hour component.
For formula field you can use - HOUR( TIMEVALUE(fieldName) )
Hope it helps you.
Thanks,
KP
https://thesalesforcetutorial.blogspot.com/2021/07/how-to-calculate-number-of-hours.html
CoCo works directly with the artists and designers to make that special gift for your corporate event Corporate gifts Australia (https://contemporaryco.com.au/collections/corporate-gifts).