Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
also If I use
date#(week( posting, 'DD/MM/YYYY')) as posting
the result is this:
posting | weekly |
03/01/2010 | 53 |
02/01/2010 | 53 |
01/01/2010 | 53 |
01/01/2012 | 52 |
02/01/2011 | 52 |
01/01/2011 | 52 |
the week are wrong.. some help?
Many thanks.
Regards.
Correct:
IF (
(DayNumberOfYear(posting)) < 7
and week(posting) > 2
, 1 ,
week(date#( posting, 'DD/MM/YYYY'))) as weekly ,
Hi,
Check the date format which you are using
and try with some other dates bcoz 1st week of the year may fall in pevious year week
Sivaraj S
some ex which i have tried
Posting | Week |
1/1/2010 | 53 |
2/1/2010 | 53 |
3/1/2010 | 53 |
4/1/2010 | 1 |
5/1/2010 | 1 |
6/1/2010 | 1 |
ist jan 2010 starts with last week of previous year
Sivaraj S
Right. Number of some <7 first days are in last week. Try to use expression like:
IF ( DayNumberOfYear(posting) < 7 and week(posting) > 2,
1,
date#(week( posting, 'DD/MM/YYYY'))
)
if ( MyEnglish == Bad ) {
Sorry;
}
To force in this way is a solution???
But, dos this problem is a a QV bug?
For the future week() statement I will put always the forced value?
Why u use WeekStart(Posting) ?
Dnt see a reson for it.
To force in this way is a solution???
But, dos this problem is a a QV bug?
For the future week() statement I will put always the forced value?
Its a solution for your request. U will force only week number of first 7 days, when they are in last week of previous year, if you dnt like normal state. When 1st junary at last week of previous year its normal state. dnt confuse with it. ))
IF ( DayNumberOfYear(posting) < 7 and week(posting) > 2,
1,
date#(week( posting, 'DD/MM/YYYY'))
)
I have to put the script in script editor of QV.. are sure it works?
Many rhanks.
K.
Correct:
IF (
(DayNumberOfYear(posting)) < 7
and week(posting) > 2
, 1 ,
week(date#( posting, 'DD/MM/YYYY'))) as weekly ,