+ Start a Discussion
avimeiravimeir 

Filter by hour of the day

Hi all,

 

We have an object called Payment__c  and it has a datetime field called Payment_Time__c.

 

A user is asking to create a report and filter the results by the time of the day of Payment_Time__c - only show results if Payment_Time__c > 1/1/2014 10:00 and Payment_Time__c < 1/2/2014 10:00.

 

Is there a way to filter by time of day in reports?

 

I thought of an ugly hack of a forumla field taking the time from the Payment_Time__c field, but I hate this solution. Wanted to use the datetime method format('HH:MM') to create a new forumla field and filter by it, but can't seem to use this method in a formula field.

 

Any ideas?

Best Answer chosen by Admin (Salesforce Developers) 
sandeep@Salesforcesandeep@Salesforce

You need to apply this filter on report side. 

 

Payment Time greater than 1/1/2014 10:00  

Payment Time  less than 1/2/2014 10:00

All Answers

Arun MKArun MK

Hi,

 

You can type the date time value including time.

 

You can mention

 

Created Date     greater than     2/28/2011 1:30 AM

Created Date     less than           2/28/2011 1:40 AM

 

This will fetch you the correct data.

 

Regards,

Arun.

sandeep@Salesforcesandeep@Salesforce

You need to apply this filter on report side. 

 

Payment Time greater than 1/1/2014 10:00  

Payment Time  less than 1/2/2014 10:00

This was selected as the best answer
avimeiravimeir
Thanks!

This is a bit of a hack, I'd expect the reporting function to allow filtering by full date/time including hour, but this will work for now..

Cheers