Get the App
SLTechnology News&Howtos  ›  Database  › 

How to find the data in the morning and afternoon in sqlserver

Shulou Source: shulou.com Published: 2022-05-31 18:43:00 10月01日 Update

This article mainly shows you "how to find the morning and afternoon data in sqlserver", which is easy to understand and well-organized. I hope it can help you solve your doubts. Let me lead you to study and learn this article "how to find the morning and afternoon data in sqlserver".

The DATEPART () function returns a separate part of the date / time, such as year, month, day, hour, minute, and so on.

The DATEDIFF () function returns the time difference between two dates.

-- find the data of that morning select * from R_Attendance where (datepart (hour,RDatetime) > = 0 and datepart (hour,RDatetime) 12 and datepart (hour,RDatetime))

Tags: Data function time result content time difference article two hours date study help between score just days years easy to understand more organized Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Shulou Technology Xiaomi Linux Redmi