Database.Guide

Skip to content

Beginners

  • What is a Database?
  • Database Tutorial

SQL

  • SQL Tutorial
  • SQL Reference
  • SQL Joins Tutorial
  • SQL Transactions Tutorial
  • Basic SQL Queries

Categories

  • Azure SQL Edge (17)
  • Database Concepts (99)
  • Database Tools (72)
  • DBMS (9)
  • DuckDB (128)
  • MariaDB (424)
  • Microsoft Access (17)
  • MongoDB (265)
  • MySQL (602)
  • NoSQL (8)
  • Oracle (301)
  • PostgreSQL (480)
  • Redis (210)
  • SQL (697)
  • SQL Server (1,169)
  • SQLite (298)

FROM_DAYS() Examples – MySQL

Posted on June 25, 2018January 28, 2021 by Ian

In MySQL, the FROM_DAYS() function returns a date value based on the number of days provided as an argument.

This article contains examples to demonstrate.

Continue reading →

MySQL date functions, dates, functions

EXTRACT() Examples – MySQL

Posted on June 25, 2018January 28, 2021 by Ian

In MySQL, you can use the EXTRACT() function to extract parts from a date. For example, you can extract the year part, the month part, or the day part, etc. You can also extract parts from the time component, such as minutes, seconds, microseconds, etc.

This article contains examples to demonstrate.

Continue reading →

MySQL date functions, dates, functions

DAYOFYEAR() Examples – MySQL

Posted on June 25, 2018January 28, 2021 by Ian

When running queries in MySQL, you can use the DAYOFYEAR() function to return the day of the year from a date.

This function accepts one argument, and it returns a value between 1 and 366, depending on which day of the year the day part of the argument represents.

Continue reading →

MySQL date functions, dates, functions

DAYOFWEEK() Examples – MySQL

Posted on June 25, 2018January 28, 2021 by Ian

You can use the DAYOFWEEK() function in MySQL to return the day of the week from a date.

In this context, a return value of 1 corresponds to Sunday, 2 corresponds to Monday, etc.

This article contains examples to demonstrate.

Continue reading →

MySQL date functions, dates, functions

DAYNAME() Examples – MySQL

Posted on June 25, 2018January 28, 2021 by Ian

You can use the DAYNAME() function in MySQL to return the weekday name from a date.

By “weekday name”, I mean a value like Monday or Sunday. For example, if you provide a date of 2018-01-07, the DAYNAME() function will return Sunday.

Continue reading →

MySQL date functions, dates, functions

DAY() Examples – MySQL

Posted on June 25, 2018January 28, 2021 by Ian

In MySQL, the DAY() function is a synonym for the DAYOFMONTH() function. It’s used to return the day of the month from a date.

In this context the “day of the month” is a value between 1 and 31, or 0 for dates with a zero day part. For example, if you provide a date of 2020-05-03, the DAY() function will return 3.

Continue reading →

MySQL date functions, dates, functions

DAYOFMONTH() Examples – MySQL

Posted on June 25, 2018January 28, 2021 by Ian

You can use the DAYOFMONTH() function in MySQL to return the day of the month from a date.

By “day of the month”, I mean a value between 1 and 31 (or 0 for dates with a zero day part), as opposed to the day of the week, such as Monday etc.

For example, if you provide a date of 2018-01-07, the DAYOFMONTH() function will return 7.

Continue reading →

MySQL date functions, dates, functions

DATE_FORMAT() Examples – MySQL

Posted on June 24, 2018January 28, 2021 by Ian

This article contains examples of the DATE_FORMAT() function in MySQL.

The DATE_FORMAT() function allows you to return a date in a specified format. For example, you can use it to return  2020-06-18 as Thursday, June 2020, or whatever other format you require.

Continue reading →

MySQL date functions, dates, functions

DATEDIFF() Examples – MySQL

Posted on June 24, 2018January 28, 2021 by Ian

In MySQL, you can use the DATEDIFF() function to find the difference between two dates. The way it works is, you provide two arguments (one for each date), and DATEDIFF() will return the number of days between the two dates.

Examples below.

Continue reading →

MySQL date functions, dates, functions

DATE() Examples – MySQL

Posted on June 24, 2018January 28, 2021 by Ian

When using MySQL, you can use the DATE() function to extract the date part from a date or datetime expression.

Here’s how it works.

Continue reading →

MySQL date functions, dates, functions
  • «
  • 1
  • …
  • 353
  • 354
  • 355
  • 356
  • 357
  • …
  • 388
  • »

About Database.Guide | Privacy Policy