Toggle navigation
HOME
plus2net HOME
PHP
JavaScript
HTML
Python
ASP
jQuery
C
PhotoShop
SQL
SQL Home
Database Basic
PHP MySQL
Date
Math
Select
Insert
Delete
Left Join
String
Search
Date Functions
Date functions
BETWEEN
CURDATE()
DATE_ADD()
DATE_SUB()
EXTRACT()
STR_TO_DATE()
TO_DAYS()
DATE_FORMAT()
DAY()
DAYNAME()
DAYOFWEEK()
DAYOFYEAR()
LAST_DAY()
MAKEDATE()
MONTH()
MONTHNAME()
NOW()
YEAR()
YEARWEEK()
WEEK()
WEEKDAY()
WEEKOFYEAR()
Login
×
Login
Username
Password
Login
Contact Us
Demo of MySQL DATEDIFF()
Date1:
Date2:
SELECT First Date
←
DATEDIFF() Tutorial
All Date Functions
→
←
Subscribe to our YouTube Channel here
This article is written by
plus2net.com
team.
https://www.plus2net.com
Subscribe
*
indicates required
Email Address
*
First Name
Last Name
Subscribe to plus2net
plus2net.com
▼ More on Date & Time functions in SQL
Date & Time functions used in Query for MySQL Table
Getting formatted date value from date field in MySQL
date_add function to calculate date & time of MySQL table
Formatting date and time before adding to date field of MySQL
String data to Date & time Format by using str_to_date
Formatting string data stored in varchar field to date value
Automatically updating / inserting current date and time value in a DATETIME field
Records of each day by using group by command
Collecting records between two date ranges from MySQL table fields
Generating query based on user inputs of date from two calendars
Getting date values from MYSQL table in readable format including time
Difference in days between two date fields
Getting the year part from date field
Getting the month part from date field
Getting the day part from date field
Records of today or records of last X seconds by using curdate() or unix_timestamp
Records of last one month from today by using date field
Records of present week days by using dayofweek function
Post your comments , suggestion , error , requirements etc here .
Detail
Queries
INSERT
UPDATE
Aggregate Queries
AVG ( Average )
SUM
MIN
MAX
SQL Video Tutorials
SQL Exercise
✖
We use cookies to improve your browsing experience. .
Learn more
HTML
MySQL
PHP
JavaScript
ASP
Photoshop
Articles
FORUM
.
Contact us
©
2000-2023
plus2net.com
All rights reserved worldwide
Privacy Policy
Disclaimer