Convert Seconds & Days Since Year 0-1970 - Free Online Tool

Convert various epoch variants: seconds/days since year 0, year 1 AD, 1900, 1904, and 1970. MySQL compatible, Excel date functions support.

Seconds Since Year 0

This tool converts seconds since year 0 to human-readable dates. It's compatible with MySQL's TO_SECONDS function (MySQL 5.5+).

Year 0 is defined as 0000-00-00 00:00 GMT. Please note that this is not a valid date! There is no year 0.

Visit the homepage to convert to/from seconds since 1/1/1970.

Seconds Since 0001-01-01 AD

This tool converts seconds since January 1, 1 AD (extrapolated Gregorian calendar) to regular dates.

Days Since Year 0

Compatible with MySQL's TO_DAYS function (MySQL 5.5+).

Days Since 0001-01-01 AD

Days Since 1900-01-01

This number (+2) is used in the Microsoft Excel date functions such as DAY(serial_number) and WEEKDAY().

Note: Excel's serial number is 2 higher than the number on this page.

  • In Excel January 1 is serial number 1. In this converter midnight January 1, 1900 is 0, after 1 day it is midnight on January 2. To correct this you have to add/subtract 1.
  • Excel incorrectly sees 1900 as a leap year (for compatibility with Lotus 1-2-3) so you have to add/subtract 1 to all days when using in Excel.

Days Since 1904-01-01

This number (+1) was used for Microsoft Excel date functions on earlier versions only for the Mac.

Excel 2016 for the Mac uses 1900 as a default start date.

Days Since 1970-01-01

There were days since January 1, 1970, the Unix epoch.

About Epoch Variants

Different systems and applications use different reference dates (epochs) for calculating dates and times. This page provides conversion tools for various epoch variants commonly used in databases, spreadsheets, and programming. Understanding these different epochs is essential when working with legacy systems, database migrations, or when converting dates between different software platforms.

Key epochs:

  • Year 0: Used by MySQL TO_SECONDS/TO_DAYS functions. Note: Year 0 is not a valid historical date in the Gregorian calendar.
  • Year 1 AD: January 1, 1 AD in the Gregorian calendar, used for historical date calculations.
  • 1900-01-01: Used by Microsoft Excel date functions (with +2 offset for compatibility).
  • 1904-01-01: Formerly used by Excel on Macintosh (with +1 offset), also used by Mac HFS+ file system.
  • 1970-01-01: Unix epoch, the standard for Unix timestamps used in most modern systems.

Use cases: MySQL date conversions, Excel date serial number calculations, historical date conversions, database migrations, legacy system compatibility, and converting dates between different epoch systems. This tool is particularly useful for database administrators and developers working with legacy systems or cross-platform data.

Frequently Asked Questions

What is "days since Year 0"?

Days since Year 0 is a date calculation method that counts the number of days elapsed since January 1, Year 0 (or Year 1 in some calendar systems). This format is sometimes used in historical calculations, astronomical dating, or specialized applications.

How do I calculate a date from days since Year 0?

Enter the number of days since Year 0 in the input field and click calculate. The tool will automatically convert it to a human-readable date. You can also use other epoch dates like Year 1, 1900, 1904, or 1970.

What is the difference between Year 0 and Year 1?

In astronomical year numbering, Year 0 exists (1 BC = Year 0). In the Gregorian calendar, there is no Year 0 - it goes directly from 1 BC to 1 AD. This tool supports both systems for different calculation needs.

Related Guides