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 2008 Forums
 Analysis Server and Reporting Services (2008)
 ISO week

Author  Topic 

Frans
Starting Member

4 Posts

Posted - 2015-03-04 : 06:47:47

Oracle statement
to_number(to_char(to_date('01/02/2012','MM/DD/YYYY'),'WW'))
works in SSRS and Report manager;


Oracle statement for ISO-week
to_number(to_char(to_date('01/02/2012','MM/DD/YYYY'),'IW'))
works in SSRS and not in Report manager

How can I get the ISO-weeks in the Report manager?

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2015-03-04 : 09:52:09
SELECT (DATEPART(DAYOFYEAR, DATEDIFF(DAY, '00010101', GETDATE()) / 7 * 7 + 3) + 6) / 7;


Microsoft SQL Server MVP, MCT, MCSE, MCSA, MCP, MCITP, MCTS, MCDBA
Go to Top of Page
   

- Advertisement -