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

Weeks remaining till year end

Status
Not open for further replies.

fkavanagh

MIS
Feb 12, 2003
34
IE
Hi all,

I did a search and thought I would be hit by a dozen or more posts but can anybody give me a formula to calculate the weeks remaining in a year. Obviously on jan 1 I want it to say 52 etc.

Rgds

Fergal
 
I put it in as a SQL expression (first time using this functionallity) for interest what would the formula using crystal syntax be.

select (to_date('31/12', 'dd/mm') - to_date(to_char(sysdate, 'dd/mm'), 'dd/mm')) / 7 from dual

Fergal
 
In a formula use :

datediff("ww",currentdate,date(year(currentdate),12,31))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top