Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 confused

Author  Topic 

kshitizgp
Starting Member

31 Posts

Posted - 2012-02-07 : 04:58:17
the thing is am making an annual report ...
i have to date pickers for selecting atleast 12 months if not it would give an error ...

now i have a formula in which i would break down my months to get total dayz in a month den multiply by 8


You cannot vote on your own post
0

i have a very wierd problem now ,,i used dynamic pivot and got my ans but am stuck here

the thing is ...

am getting data aas :

name block jan feb Proportion--january (new column)

xyz IT 10 25

wana to add more columns i have formula for that

it is for a month ven start_date =2012-01-01

and end_Date is -- 2012-01-31

set @totDays = DAY (@end_Date) - day(@start_Date) + 1
print @totDays
set @totalHours = @totDays *8
print @totalHours
set @totalworkhrs =( @totDays - @holidayHourCnt )*8
print @totalworkhrs

but in my CURRENT SP my start_Date is 2012-01-01 and end date is 2012-12-31 on a yearly basis

how can i make my yearly date to separte into 12 months andden into individaul months and den into individual dates and

caluclate each date individually i,.e datepart i think !




am stuck how should i convert my 2 dates start and end so that they give me months which are individually and den dates of each months den i can use my formula plzz help :((((
   

- Advertisement -