SSRS: Useful Date & Time Functions
CDateConvert to Date. =CDate(Fields!BirthDate.Value) DateAddReturns a Date value containing a date and time value to which a specified time interval has been added. =DateAdd(“d”,3,Fields!BirthDate.Value) =DateAdd(DateInterval.Day,3,Fields!BirthDate.Value) DateDiffReturns a Long value specifying the number of time intervals between two Date values. =DateDiff(“yyyy”,Fields!BirthDate.Value,”1/1/2007″) =DateDiff(DateInterval.Year,Fields!BirthDate.Value,”1/1/2007″) DatePartReturns an Integer value containing the specified component of …
How to get Day of Year from date in SQL Server
Method #1: Using DATEPART Function Method #2: Using DATENAME Function
Use of DATEADD function to get various Dates
Get First day of current week: SELECT DATEADD(wk, DATEDIFF(wk, 0, GETDATE()-1), 0) Get Last day of current week: SELECT DATEADD(wk, DATEDIFF(wk, 0, GETDATE()),6) Get First day of current month: SELECT DATEADD(mm,DATEDIFF(mm,0,GETDATE()),0) Get Last day of current month: SELECT DATEADD(mm,DATEDIFF(mm,0,GETDATE())+1,-1) Get First day of current quarter: SELECT DATEADD(qq, DATEDIFF(qq, 0, GETDATE()), …
Why “GO” statement is important in SQL Server? Do we really need it?
YES. Very much needed! GO is a batch separator in SQL. Go is essentially is SSMS code rather than a regular T-SQL code. Batch is a set of SQL statements sent together to SQL Engine. It is used to commit a set of queries or a batch to database. It …
What is Redis Redis is a NoSQL database which follows the principle of key-value store. The key-value store provides ability to store some data called a value, inside a key. You can recieve this data later only if you know the exact key used to store it. Redis is a …
Neo4J
Neo4j is a graph database management system developed by Neo4j, Inc based in the San Francisco Bay Area, USA. Described by its developers as an ACID-compliant transactional database with native graph storage and processing, Neo4j is the most popular graph database according to DB-Engines ranking, and the 22nd most popular database overall. …