Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql first day of year

SELECT DATEADD(yy, DATEDIFF(yy, 0, GETDATE()), 0);			-- SQL Server
SELECT TRUNC(sysdate, 'YEAR') FROM DUAL;					-- Oracle
SELECT MAKEDATE(year(now()), 1);							-- MySQL
Comment

mysql first day of month

-- Replace curdate() with your date column
SELECT curdate(), 
	DATE_SUB( curdate(), INTERVAL DAYOFMONTH(curdate())-1 DAY ) AS '1st of month';
Comment

mysql first day of month date

DATE(FORMAT_DATE('%Y-%m-01', CURRENT_DATE() ))
Comment

PREVIOUS NEXT
Code Example
Sql :: sql server check if temp table exists 
Sql :: how to set an already made tables auto increment in mysql 
Sql :: psql filed name alter 
Sql :: VERIFY INDEXES IN SQL ORACLE 
Sql :: open postgress in terminal mac 
Sql :: get the list of all tables in sql server 
Sql :: how to export db from mysql 
Sql :: how to ckeck that email is present in databse in mysqli 
Sql :: sql database size 
Sql :: oracle user last connected 
Sql :: mysql connection with sqlalchecmy 
Sql :: oracle first and last day of previous month 
Sql :: oracle current date without time 
Sql :: psql view enum values 
Sql :: sql server cast date dd/mm/yyyy 
Sql :: group_concat max length mysql 
Sql :: get columns number sql 
Sql :: sql how to replace full stop 
Sql :: ORACLE RIGHT TWO DIGITS 
Sql :: get current year sql 
Sql :: t-sql find object by name 
Sql :: psql is not recognized 
Sql :: left join with only first record 
Sql :: sql remove first character from string 
Sql :: mysql between start date and end date 
Sql :: oracle sql first day of year 
Sql :: Are NULL values in a database the same as that of blank space or zero? 
Sql :: oracle apex list connected users 
Sql :: insert random numbers in columns postgress 
Sql :: alter table change default 
ADD CONTENT
Topic
Content
Source link
Name
6+5 =