About 42,500 results
Open links in new tab
  1. DATEPART (Transact-SQL) - SQL Server | Microsoft Learn

    Oct 30, 2007 · Transact-SQL reference for the DATEPART function. This function returns an integer corresponding to the datepart of a specified date.

  2. SQL Server DATEPART () Function - W3Schools

    Aug 25, 2017 · Definition and Usage The DATEPART () function returns a specified part of a date. This function returns the result as an integer value. Syntax DATEPART (interval, date)

  3. SQL DATEPART Function Use and Examples - SQL Server Tips

    Apr 28, 2025 · The DATEPART function returns an integer value for the specified part of the date or time. datepart – Is the part of the date we want to get.

  4. SQL DATEPART: Get the Part of a Date in SQL Server

    Sep 19, 2024 · DATEPART is an SQL Server function that returns an integer representing the specified part of a given date. In detail, it extracts a specific part of a date, datetime, or time …

  5. SQL Server: DATEPART Function - TechOnTheNet

    This SQL Server tutorial explains how to use the DATEPART function in SQL Server (Transact-SQL) with syntax and examples. In SQL Server (Transact-SQL), the DATEPART function …

  6. DATEPART () Function in SQL Server - GeeksforGeeks

    Jul 23, 2025 · Using DATEPART () function and getting the second part of the specified date which includes time as well using a variable. Output : This function is used to find the given …

  7. Using DATEPART Function in SQL: Real-Life Examples

    Jul 16, 2025 · GETDATE () returns the current date and time. Pair it with DATEPART to learn things about right now. This tells you what hour it is.

  8. DATEPART – SQL Tutorial

    Apr 27, 2023 · The SQL DATEPART function is a useful tool for extracting specific parts of a date or time value in SQL Server. It allows you to retrieve the year, month, day, hour, minute, …

  9. SQL DATEPART () Function - Tutorial Kart

    The SQL DATEPART function is used to extract a specific part of a date, such as the year, month, day, hour, minute, or second. It is particularly useful when filtering or organizing data based on …

  10. DATEPART () Examples in SQL Server - Database.Guide

    Jun 2, 2018 · In SQL Server, the T-SQL DATEPART() function returns an integer that represents the specified datepart of the specified date. For example, you can pass in 2021-01-07 and …