Rajeev Kumar
Write a SQL Query to get the Quarter from date.
TheDate Quarter
01/10/2024 Q1
By Rajeev Kumar in SQL Server on Jan 10 2024
  • Shramik Adhikari
    Jan, 2024 16

    SELECT DATEPART(QUARTER, Columname) AS quarter FROM Tablename

    • 0
  • Eileen Aldridge
    Jan, 2024 13

    SELECT DATEPART(QUARTER, your_date_column) AS Quarter
    FROM your_table

    • 0
  • SACHIN DALAL
    Jan, 2024 12

    select YourDateColumn DATEPART(QUARTER, YourDateColumn) AS Quarter FROM YourTableName

    • 0
  • Rameez Hasan
    Jan, 2024 11

    SELECTTheDate,'Q' CAST(DATEPART(QUARTER, TheDate) AS VARCHAR) AS Quarter FROMYourTableName;

    • 0
  • Rameez Hasan
    Jan, 2024 11

    SELECT your_date_column, DATEPART(QUARTER, your_date_column) AS quarter FROM your_table_name;

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS