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!

How do I format a year week field

Status
Not open for further replies.

tuigvlieg

Programmer
Feb 9, 2005
26
NL
On our database we have a field that is displayed as 20071 where 1 is a week number and 2007 is the year number. In case we are in 200712 the week is two digit.

Curent formula used (Dutch):

="week "+Rechts(Min(<Jaar Week>) ,2)+"-"+Links(Min(<Jaar Week>) ,4)+" t/m "+"week "+Rechts(Max(<Jaar Week>) ,2)+"-"+Links(Max(<Jaar Week>) ,4)

Translated
="week "+Right(Min(<Year Week>) ,2)+"-"+Left(Min(<Year Week>) ,4)+" t/m "+"week "+Right(Max(<Year Week>) ,2)+"-"+Left(Max(<Year Week>) ,4)

I should make a display from of the 4th digit which is the end of year but I don't know how to do this.

Version of business object we are using: 5.1.8
 
It may be easier to use the substr function than left / right. In this particular case the year occupies always 4 positions. So, substr(<Jaar Week>,5,2) always selects the week portion (regardless of length 1/2)

I'm dutch , so I recall this is Tekenreeks() in Dutch versions.

Ties Blom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top