3

We have a custom web-part that uses a View to filter Procurements (Tenders) by date.

We are trying to filter the view using the [Today] function but from what I gathered it only uses the Date and disregards the Time, which is an annoyance since Tenders have opening and closing times.

From a little bit of research I found out that [Now] does not exist in SharePoint and has to be implemented through code or workflows, which is out of the question for our company since we are using custom branding for our infrastructure (we have a farm and give portals to clients for which they manage the content).

Is there any method how we can filter by Date & Time with minimal modifications?

0

I know it's perhaps too late :), but here is the best solution I found: Suppose you have a Date and Time column named "StartDate", add a calculated column with the following formula to extract the time : TEXT(StartDate-DATE(YEAR(StartDate),MONTH(StartDate),DAY(StartDate)),"h:mm")

You will get the time extracted with the hh:mm format, and you can do your filter based on the two columns

Hope this will hel :)

0

Basically, [Today] doesn't include the time value, so the values in the background are like this:

[Today] = 40,024 (Serial date value)
[Start Date] = 40,024.604166667 (Serial date + time value)

This means that you can't check the Time using [Today]

The easiest, yet not recommended solution would be modifying the view in SPD.

Follow this short guide: Filtering views by Time and Date

0

Modify view on behalf of created field under Filter option & set logic there

  • Welcome to community, when you provide answer or solution to some question make sure you describe it well for others and can add some code parts or web reference. your answer here looks more like comment than answer. Please update your answer. – Ankitkumar Malde Jul 25 '18 at 10:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.