I have an Orders table (Date is the time of the order up to a minute. CountMaterial is the amount of materials used)

How do i round off order time to day. To see how much material was used per day?

    2 answers 2

    SELECT CAST(GETDATE() AS DATE); 

    instead of getdate substitute your date

      to_char (Date, 'DD / MM / YYYY')

       SELECT SUM(CountMaterial), TO_CHAR(Date, 'DD/MM/YYYY') FROM Orders GROUP BY TO_CHAR(Date, 'DD/MM/YYYY')