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

Problems generating weeknumbers from dates 1

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Help!
I'm using Crystal Reports 7 and am having problems writing a formula/function that generates weeknumbers from datefields of a database. Of each date I need to know the weeknumber. I couldn't find this in an existing function in CR 7.
Is there anybody who knows where I can find this function or is there anybody who can provide me the code I need?

Thanks in advance!!!
Carol
 
I'm using CR v.8, and there's a DatePart function that you could use like this: (if available in CR v.7)

myWeekNumber := DatePart("ww",{DateFieldHere})

it will return a number from 1 to 53.
 
Hi Guys,

Just a note to let you know that your thread, even though not directly related, has assisted me in solving one of my own problems! (see WeekToDateFromMonday in the Formula Forum.)

mmaz, your idea in this thread sparked a "I remember seeing something about....." thought. When pursued, I eventually solved my problem. (Thanks for your input Ken!).

So, Caro01 and mmaz, you both get a "Star". (Ken already got his in the WeekToDateFromMonday post)!!

Anyways, just goes to show you how helpful interacting with peers can be!!!!

Nuffsaid.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top