Top "Datepart" questions

DATEPART is a T-SQL function that converts a DATE type to INT according to provided format.

SELECT row by DATEPART()

I need to get rows from the database where the records are of one month. I tried this SELECT: $result = …

php mysql sql datepart
Oracle equivalent to SQL Server DATEPART

We need to get the HOUR out of a DATETIME column (expecting values from 0 to 23 to be returned). Is there …

sql oracle date datepart
How to compare two DATE values based only on date part in Oracle?

I am trying to get counts for last 30 days with the following query - SELECT date_occured, COUNT(*) FROM problem …

sql oracle date compare datepart
Error: DATEPART does not exist, frp, SQL to select last months records

I'm trying to get an SQL query to select all records from last month, I have this which from looking …

mysql sql function datepart
Postgres Time Difference

I am trying to retrieve time difference in minutes from a table(login_history as t1) using postgresql . When i …

postgresql timestamp datepart
Select Where Month= X and Year= Y

I have the following select: SELECT * FROM Table WHERE Column= datepart(month,'2013-05-07 10:18:00') AND Column= datepart(year,…

sql tsql datepart
convert week datepart number to date within week (week of...)

I am trying to figure out how to convert a datepart for a week to the Monday of that week. …

sql tsql sql-server-2005 week-number datepart
SQL change format of Datepart Month

How do you change the DATEPART format of the month to include the 0 in front of the month? For instance 5 …

sql format datepart
Select records from start of month to current date

I'm trying to select records that were added to the database between the start of the current month and the …

sql-server-2005 select dateadd datepart