School of Educational Studies

SES Events Calendar

sql: select ItemID,Title,SourceURL,SourceURLPopWin,null as SubTitle,null as TeaserText,RelatedURL,RelatedURLPopWin,c.DetailURL, Subtitle,StartDateTime,StopDateTime,cd.ChannelID FROM ChannelData cd, Channel c WHERE (cd.ChannelID IN ('{40D5EC84-EF0C-4602-BC97-68B633019F38}')) AND cd.ChannelID = c.ChannelID AND cd.Status IN (1) AND (GetDate() BETWEEN IsNull(PublishStart,GetDate()) AND IsNull(PublishStop,GetDate()+1)) AND (('6/9/2014' BETWEEN Cast(Left(StartDateTime,11) AS DateTime) AND IsNull(StopDateTime,DateAdd(day,1,StartDateTime))) OR (Cast(Left(StartDateTime,11) AS DateTime) = '6/9/2014')) AND DATEPART(month,StartDateTime) = DATEPART(month,'6/9/2014') AND DATEPART(year,StartDateTime) = DATEPART(year,'6/9/2014') ORDER BY StartDateTime ASC