Using the DATEPART function to calculate the integer value of the day of the week. select datepart(dw,getdate()) as DayOfWeekINT Output: DayOfWeekINT ———— 2 1 = Sunday 2 = Mo… more →
Rob Bamforth's Blogwrote 1 month ago: Hi All, select getdate(),current_Timestamp Both of them returns the same value. Now let us go to nex … more →
wrote 6 months ago: This is an amazing Javascript Date reference. Check it out: http://www.hunlock.com/blogs/Javascript_ … more →
wrote 8 months ago: I wanted to share a function to calculate Weekly, Fortnightly, Monthly, 3 Months dates between two d … more →
wrote 1 year ago: I’ll give you 2 example. Example 1: SimpleDateFormat df = new SimpleDateFormat("dd/MM/yyy … more →
wrote 1 year ago: Higher-Precision System Date and Time Functions SYSDATETIME Returns a datetime2(7) value that conta … more →
wrote 2 years ago: To add or subtract days from a date, you can simply use: – © 2011 – Vishal (http://SqlAn … more →
wrote 2 years ago: Using the DATEPART function to calculate the integer value of the day of the week. select datepart(d … more →
wrote 2 years ago: For SQLServer using arthemetic and DATEADD one can modify date select getdate() -- today , … more →
wrote 2 years ago: UDF or User Defined Functions are a set or batch of code where one can apply any SQL logic and retur … more →
wrote 2 years ago: To get the current date in Sql Server queries and stored procedures, you use the GetDate() method. B … more →
wrote 2 years ago: When comparing dates it is important to remember that the DATETIME format has a timestamp that is in … more →
wrote 2 years ago: The following table shows some of the most common date formats available using the SQL function GETD … more →
wrote 3 years ago: I have been repeatedly asked to produce queries in MDX across a number of SSAS cubes that use the qu … more →
wrote 3 years ago: The SQL getdate() function returns the current date along with the current time, as shown below 2010 … more →
wrote 3 years ago: — SQL server version SELECT @@version output: Microsoft SQL Server 2005 – 9.00.1399.06 ( … more →
wrote 3 years ago: There are three ways to retrieve the current datetime in SQL SERVER. CURRENT_TIMESTAMP, GETDATE(), { … more →
wrote 3 years ago: The getDate() function is used to generate the current date. print getDate() This can be used with v … more →
wrote 3 years ago: Uma dica rápida antes do feriadão: Como agendar um script ou executá-lo de forma recorrente sem util … more →
wrote 3 years ago: Retrieving rows for the last 3 months: This query is for retrieving the last 3 months data from sql … more →