Below the video are great date functions on Azure Synapse. However, you can first witness a two-minute video that joins a Synapse table with tables from Databricks, Snowflake, Redshift, Google BiqQuery, Vertica, Teradata, Oracle, SQL Server, DB2, Yellowbrick, MySQL, Postgres, Microsoft Access, Excel in a single federated query.

You can now download our books on Synapse, Redshift, Google BigQuery, DB2, Oracle, Yellowbrick, Vertica, MySQL, Postgres, and more for FREE.

You can download the PDFs from our CoffingDW.com website immediately.

Here is how you do it. Go to CoffingDW.com and click on Books from the top right menu. You will then be in the CoffingDW bookstore, where you will see the Snowflake book. Add the Snowflake book to your cart.

Add any book you want to your cart.

When you check out, you use the coupon FRIEND2023.

You won’t have to enter any credit card information. Just put in your name and email, and the price will be discounted to zero. You can then download the book immediately at no cost to you.

The Getdate command will return today’s date and time, just like the Current_Timestamp command. However, the Getdate function is not ANSI standard.

The DATEADD function adds or subtracts an interval from a date. Valid values for the part argument include the year, quarter, Month, dayofyear, day, week, weekday, hour, minute, second, millisecond, microsecond, nanosecond, TZoffset, and ISO_WEEK.

The Dateadd command adds a specified time interval to a date or timestamp value. Below we use examples of DAY, WEEK, MONTH, and QUARTER.

Below are some excellent examples to pull from using the DATEPART function.

The YEAR, MONTH, and DAY functions are abbreviations for the DATEPART function. 

The DATENAME function returns the name of the requested part rather than the number. Notice above that only the Month returns the actual name of the Month, but both the Year and the Day still return the integer values.

The FORMAT  function returns a value formatted with the specified format and optional culture. For example, as we have done for the United States and Great Britain, you can use the FORMAT function for locale-aware formatting of date/time and number values as strings.

The FORMAT  function returns a value formatted with the specified format and optional culture. For example, as we have done for Germany and China, you can use the FORMAT function for locale-aware formatting of date/time and number values as strings.

The FORMAT  function returns a value formatted with the specified format and optional culture. For example, you can use the FORMAT function for locale-aware formatting of date/time and number values as strings.

The DATEFROMPARTS function returns a date value, with the date portion set to the specified year, month, and day and the time portion set to the default. For invalid arguments, DATEFROMPARTS kicks out an error. DATEFROMPARTS returns null if at least one required argument has a null value.