Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Other issue with Now date in comparison (formula/filter)

Status
Not open for further replies.

Hesaf

IS-IT--Management
Aug 12, 2008
15
0
0
EU
We have another issue wrt the now usage in formulas/filters:

Required:
"Filter that includes task with finish date less than or equal to today"

Initial thought for filter:
IIf([Finish]<=Now(),True,False).
But this doesn't work. It will not mark tasks 'True' which end on the same day as returned by Now() although <= is taken as comparison.
-------------------------
Analysis:
PC clock date & time : Wk27.4 - 13.00
Now() date & time returns : Wk27.4 - 13.00
So Now() accurately describes the current date & time.

Task entered with finish Wk27.4 supposedly is stored internally as : W27/4/09 8:00 AM (start for working day)
If the filter would take hours into account, the '<=' should have worked properly....... (but take into account hours is actually not what we want to compare on).

If the filter would just compare the date, the '<=' should have worked.. Why isn't it working ?
----------
After some experimenting :
IIf([Finish]<=Now()+0.5,True,False) seems to work.
It also correctly seems to mark tasks 'False' finishing Wk27.5.

What is the explanation for this issue as it seems not to be logical what is happening?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top