SSRS_WEEK_CUR

The shared datasets used in reports
Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
User avatar
robinwilson16
Site Admin
Posts: 185
Joined: Sun Oct 16, 2016 6:46 pm
Forename: Robin
Surname: Wilson
College Name: FEA
Position: MIS Consultant
LinkedIn Profile: https://www.linkedin.com/in/robinwilson16
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

SSRS_WEEK_CUR

Post by robinwilson16 » Mon Feb 20, 2017 6:07 pm

Lists the current week number:

Code: Select all

CREATE FUNCTION [dbo].[SSRS_WEEK_CUR] (
	@Session VARCHAR(7)
)
RETURNS TABLE
AS
RETURN

--DECLARE @Session VARCHAR(7) = '2016-17'
	SELECT
		Code = WN.WeekNum,
		Description = FORMAT ( WN.WeekNum, '0#' ) + ' (' + FORMAT ( WN.StartDate, 'dd/MM/yyyy' ) + ' - ' + FORMAT ( WN.EndDate, 'dd/MM/yyyy' ) + ')'
	FROM GC.dbo.TVF_WeekNumbers ( @Session ) WN
	WHERE
		WN.StartDate <= GetDate()
		AND WN.EndDate >= GetDate()
Attachments
SSRS_WEEK_CUR.rsd
(1.05 KiB) Downloaded 99 times

Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Who is online

Users browsing this forum: No registered users and 1 guest