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.

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.