cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dmouser Frequent Visitor
Frequent Visitor

Using Today () for duration of day

Hello, I have setup a formula to generate a category for completion deadlines based on time and date, relative to today.  However, using Today () in the formula appears to be keying off of today at midnight (mm/dd/yyyy 00:00:00).  Therefore, anything later than midnight today is showing up in the formula category beyond today. 

 

Suspense Category = IF('Main Working List'[Due to Requestor]=TODAY(),"Due Today",if('Main Working List'[Due to Requestor]<NOW(),"Overdue",if('Main Working List'[Due to Requestor]>NOW(),"Due This Week",BLANK())))

 

Here is a picture of my results.  As you can see, items schedule through today are coming up as Due This Week (which is true), but they're also due today.

 

submission_deadlines_example.PNG

 

 

 

 

 

 

Any ideas?  Do I need to add an additional IF clause that is >=Today()+1 somewhere?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
dmouser Frequent Visitor
Frequent Visitor

Re: Using Today () for duration of day

Thank you @ChrisMendoza @rajendran and @Anonymous for your replies.  I think I found another solution.  I modified the formula to read [Due to Requestor].[Date] = Today().  Adding the .[Date] appears to have forced the formula to render the correct results. 

4 REPLIES 4
Anonymous
Not applicable

Re: Using Today () for duration of day

Hey @dmouser

 

You can cast both your column and TODAY as dates to do your comparison. See picture:

 

IsToday.PNG

 

Hope this helps,

Parker

ChrisMendoza Established Member
Established Member

Re: Using Today () for duration of day

@dmouser

 

If I understood your issue it is because TODAY( ) returns 8/7/2018 12:00:00 AM, correct?

 

You could try something like:

 

Column = DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY()))&" "&TIME(23,59,59)

Then change the Data type to Date/Time and it should return 8/7/2018 11:59:59 PM.

Super User
Super User

Re: Using Today () for duration of day

Hi @dmouser

 

Remember that Today () returns datetime value with the time "12:00:00 AM" always. Thats why its not matching any records with time beyond 12 am.  @Anonymous solution will work for you.

 

Thanks

Raj

Highlighted
dmouser Frequent Visitor
Frequent Visitor

Re: Using Today () for duration of day

Thank you @ChrisMendoza @rajendran and @Anonymous for your replies.  I think I found another solution.  I modified the formula to read [Due to Requestor].[Date] = Today().  Adding the .[Date] appears to have forced the formula to render the correct results.