Forum Discussion
Rob Nunley
Mar 27, 2020Brass Contributor
SharePoint Date/Time Filter
I have a SharePoint list with a large number of entries. There is a Date/Time column in the following format: mm/dd/yyyy hh:mm. I have need to filter the data between yesterday at 14:00 and today a...
Swaminathan Sriram
Mar 28, 2020Iron Contributor
Hi,
Let's say the Date/Time column you have is ServiceDate, you could add a new calculated column to extract and store the time (use the below formula to get the time component and save it). Now, you can either filter directly with these 2 date and time columns or create a view and configure filter to show the items filtered using these 2 columns for the required range.
Formula for the calculated column -
TEXT(ServiceDate-DATE(YEAR(ServiceDate),MONTH(ServiceDate),DAY(ServiceDate)),"h:mm")
Thanks.
Let's say the Date/Time column you have is ServiceDate, you could add a new calculated column to extract and store the time (use the below formula to get the time component and save it). Now, you can either filter directly with these 2 date and time columns or create a view and configure filter to show the items filtered using these 2 columns for the required range.
Formula for the calculated column -
TEXT(ServiceDate-DATE(YEAR(ServiceDate),MONTH(ServiceDate),DAY(ServiceDate)),"h:mm")
Thanks.
- Rob NunleyMar 28, 2020Brass Contributor
Hi,
Thanks for the response. I have a time column now. How would the filter look in the SP view? Seams I would need to use the [Today] function somehow to get yesterday's entries after 14:00 and then today's entries before 13:59.
Thanks!