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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quick Date ? 1

Status
Not open for further replies.

rdjohnso

Programmer
Mar 30, 2001
67
US
What I have....

=TotalResourceCost("GWHIS",#1/1/2006#,#1/31/2006#)

What I need....

=TotalResourceCost("GWHIS",A1,B2)

A1 - should be 1st day of Jan, CurrentYr
B2 - should be Last day of Jan, CurrentYr

Ideas?

Thanks for assistance
 
Code:
=TotalResourceCost("GWHIS",dateserial(year(date),1,1),dateserial(year(date),2,1)-1)

----------------------------------------------
Ben O'Hara
David W. Fenton said:
We could be confused in exactly the same way, but confusion might be like Nulls, and not comparable.
 
Or

=TotalResourceCost("GWHIS", DateSerial(Year(Date), 1, 1), DateSerial(Year(Date), 2, 0))
 
And more evident:
=TotalResourceCost("GWHIS", DateSerial(Year(Date), 1, 1), DateSerial(Year(Date), 1, 31))

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top