Date data types in MySQL

DATE only

Format : YYYY-MM-DD
Range of values:'1000-01-01' to '9999-12-31'

Example : News_date DATE

By default MySQL store in YYYY-MM-DD format

DATETIME [fsp]

Range of value : '1000-01-01 00:00:00.000000' to '9999-12-31 23:59:59.999999' Example : News_datetime DATETIME

fsp: is the fraction of second from .000000 to .999999

TIME

Range of value : '00:00:00.000000' to '23:59:59.999999' Example : News_time TIME

fsp: is the fraction of second from .000000 to .999999

TIMESTAMP

values are stored as the number of seconds since the epoch ('1970-01-01 00:00:00' UTC)
fsp: is the fraction of second from .000000 to .999999

YEAR

Value of year is stored as YYYY.
Create Table DataType Numeric Copy Table & SHOW CREATE Table
Data Types
Subhendu Mohapatra — author at plus2net
Subhendu Mohapatra

Author

🎥 Join me live on YouTube

Passionate about coding and teaching, I publish practical tutorials on PHP, Python, JavaScript, SQL, and web development. My goal is to make learning simple, engaging, and project‑oriented with real examples and source code.



Subscribe to our YouTube Channel here



plus2net.com




SQL Video Tutorials










We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles Contact us
©2000-2025   plus2net.com   All rights reserved worldwide Privacy Policy Disclaimer