Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i have calendar date and for every month and i want to calcualte the weeks ..
for that i used the below expression to
'Week-'&(1+ ceil((K_DATE-FLOOR(WEEKEND(MONTHSTART(K_DATE),0,-1)))/7)) AS Week, this works fine and show
Week1, week2 ,week3, week4, week5,
now the issue i have is instead of week1 i want to show the dates i.e. starting date and end date of that week.. for every particular month...
and also i want to exclude weekends ..
so i used this
'Week Of ' &
Date((WeekStart(K_DATE)),'MM/DD') &'-'& Date((WeekEnd(K_DATE)),'MM/DD') AS Weekof, this works fine but i in the weekend function i want to calculate the end date of the week say friday..
Any help would be really Appreciates..
Thanks
The trouble is that your weeks are not linked to the dates, like on a table. On an application likes yours i had to create a qvd that contains thats parameters then i just charge the data from qvd and show the way you want.
Hi thanks for the reply ,
i have all the dates from that date i want to calcuate year, month , week that works
from those dates i want to create a week in suach a way its show the end date and start date of that week instead of week1 , wee ( week start date , week end date)
'Week Of ' &
Date((WeekStart(K_DATE)),'MM/DD') &'-'& Date((WeekEnd(K_DATE) - 2),'MM/DD') AS Weekof
I used 2 here by considering week end date as sunday. For you it is saturday then it will be 1