Welcome Guest | My Membership | Login

More MultiValue Database and Products Articles...

Tech Tip! - Sort Data by Week Number

Sorting your data from TCL by week no is easier than you think.

Conference Schedule

Phoenix 2019 - April 8th-11th
More Info



Release Date: Monday, January 1, 0001

There are times when doing reports when you need to sort your values into weeks.  Most people would end up writing a program to do this, but that is not necessary.

So assuming attribute 14 contains a date, then

F Correlative

A Correlative
A;(14 / "7")

A full dictionary item would like the like the following

001 S
002 0
003 Week Number
008 F;14;C1;+;C7;/
009 R
010 6

is now the week number since 1968, with Sunday as the start of the week. You can then use this in a BREAK-ON.


If you want to have Monday as the beginning of the week, then do the follow:

001 S
002 0
003 Week Number
008 F;14;C1;-;C7;/
009 R
010 6

This Tips was derived from Tom Phillips. He has lost of more samples like this at http://www.tom-phillips.info


# # #          # # #          # # #


Related Articles:

Return to top