TheToeOfPooh
Active Member
- Joined
- May 21, 2004
- Messages
- 254
Tracking outstanding projects by Manager
I would like to know how\if I can use the following SQL statement -
provided by andrew93 in another thread
SELECT T_Dates.start, Weekday(Now()) AS Today, Int(Now()-[start]) AS Elapsed, ([Elapsed] Mod 7) AS XSDays, IIf([XSDays]=0,0,IIf([Today]=1,[XSDays]-1,IIf([XSDays]+1=[Today],[XSDays]-1,IIf([XSDays]<[Today]-1,[XSDays],[XSDays]-2)))) AS XSWDays, Int((Now()-[start])/7) AS Weeks, ([Weeks]*5)+[XSWDays] AS WorkDays
FROM T_Dates;
Using the above example I have created a table T_Dates and included amongst others the following fields.
Name (Text)
Task (Text)
Completed (Yes/No)
Deadline (Short Format of Date time e.g. 15/03/05)
Using the field called Deadline calculate number of work days between then and today where Completed = No
Through lack of knowledge I am unable to ammend the statement.
Any sugestions please?
Bernard
I would like to know how\if I can use the following SQL statement -
provided by andrew93 in another thread
SELECT T_Dates.start, Weekday(Now()) AS Today, Int(Now()-[start]) AS Elapsed, ([Elapsed] Mod 7) AS XSDays, IIf([XSDays]=0,0,IIf([Today]=1,[XSDays]-1,IIf([XSDays]+1=[Today],[XSDays]-1,IIf([XSDays]<[Today]-1,[XSDays],[XSDays]-2)))) AS XSWDays, Int((Now()-[start])/7) AS Weeks, ([Weeks]*5)+[XSWDays] AS WorkDays
FROM T_Dates;
Using the above example I have created a table T_Dates and included amongst others the following fields.
Name (Text)
Task (Text)
Completed (Yes/No)
Deadline (Short Format of Date time e.g. 15/03/05)
Using the field called Deadline calculate number of work days between then and today where Completed = No
Through lack of knowledge I am unable to ammend the statement.
Any sugestions please?
Bernard