Find length of quarter based on inputted number?

H

Henrootje

TblROSR <- the table
================
ROSR_QuarterNumber numeric 'contains the number that defines the
quarter
ROSR_QuarterLength numeric 'should contain the length in days of
the quarter


During the import of some textfile with data my users have to input a
number that denotes the quarter (ROSR_QuarterNumber)
EG: if they import a file with data from the fourth quarter of 2005
they will enter:
54 (5, being the year 2005, 4 being the fourth quarter)
(1-10-2005 / 31-12-2005)
61 (6, being the year 2006, 1 being the first quarter)
(1-1-2006 / 31-3-2006)

This value is stored in a numeric field in the table TblROSR

Now I need to calculate the length (in calenderdays) of the quarter and
fill the field ROSR_QuarterLength with it.

Any suggestions as to how this best can be done?

TIA,

Henro
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top