Microsoft Epoch Time Converter: How It Works
The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.
The Microsoft epoch time converter is a tool that translates Unix epoch time (seconds since January 1, 1970) into a human-readable date and time, and often back again. You enter a numeric timestamp or a date, and the calculator returns the corresponding date/time or epoch seconds, typically in UTC or your local timezone.
Formula
The core formula for converting a date to epoch seconds is:
Epoch seconds = (date_serial – 25569) × 86400 + (hour × 3600 + minute × 60 + second)
Where:
- date_serial is the Excel/date serial number for the date (days since 1900-01-01, with 1900-01-01 = 1). For example, 2023-11-14 has a serial of 45244.
- 25569 is the serial number for 1970-01-01 (the Unix epoch).
- 86400 is the number of seconds in a day.
- hour, minute, second are the time components in 24-hour format (0-23, 0-59, 0-59).
The reverse conversion (epoch seconds to date) is simply: date_serial = (epoch_seconds / 86400) + 25569, then convert the serial to a calendar date.
Worked Example
Using the default values from the calculator above:
- Date: 2023-11-14, Time: 22:13:20
- Serial for 2023-11-14: 45244 (days since 1900-01-01)
- Epoch seconds = (45244 – 25569) × 86400 + (22 × 3600 + 13 × 60 + 20)
- Compute: 19675 × 86400 = 1,699,920,000
- Time: 22×3600 = 79,200; 13×60 = 780; +20 = 80,000
- Total: 1,699,920,000 + 80,000 = 1,700,000,000
The result is 1,700,000,000 epoch seconds, which matches the default input. The reverse conversion of 1,700,000,000 seconds gives 2023-11-14 22:13:20 UTC.
What Is Microsoft Epoch Time?
Microsoft platforms use several different time formats, which often causes confusion. The most common is the Unix epoch (seconds since 1970-01-01 UTC), used in many programming languages and APIs. However, Microsoft Excel and Access use a serial date system where day 1 is January 1, 1900 (with a known leap year bug). PowerShell and .NET often use ticks (100-nanosecond intervals since 0001-01-01). When someone asks for a “Microsoft epoch time converter,� they usually need to convert between Unix epoch seconds and human-readable dates, but sometimes they need Excel serial dates or .NET ticks.
How to Choose the Right Converter
Before converting, identify which format you have:
- Unix epoch seconds – 10-digit numbers like 1700000000. Use a standard epoch converter.
- Excel serial date – numbers like 45244. Use an Excel date converter (note the 1900 leap year bug).
- .NET ticks – 18-digit numbers like 638360000000000000. Use a ticks converter.
- ISO 8601 string – e.g., “2023-11-14T22:13:20Z�. Most converters handle this directly.
If you are working with databases or APIs, check the documentation for the exact format. Many Microsoft tools (like Azure) return Unix epoch milliseconds (13 digits) – divide by 1000 to get seconds.
Common Problems and Mistakes
One frequent mistake is mixing up seconds and milliseconds. A 13-digit number is milliseconds, not seconds. For example, 1700000000000 ms is 1700000000 s. Another issue is timezone confusion: epoch time is always UTC, but when displaying local time, you must apply the correct offset. Also, Excel’s serial date has a known bug: it treats 1900 as a leap year, so dates before March 1, 1900 are off by one day. Finally, some systems use signed 32-bit integers, which overflow in 2038 – the “Year 2038 problem.�
Why Use an Online Converter?
Manual conversion is error-prone because it involves large numbers and timezone offsets. An online converter gives instant results and handles edge cases like leap years and daylight saving time (though epoch time itself is DST-agnostic). It also helps when debugging logs, reading timestamps from databases, or verifying API responses. Many converters also offer batch conversion or show both UTC and local time, which is useful for developers and system administrators.
Alternatives and Built-in Tools
If you prefer not to use a web converter, you can use built-in tools:
- PowerShell: Use
[DateTimeOffset]::FromUnixTimeSeconds(1700000000)to convert to local time, or[DateTimeOffset]::UtcNow.ToUnixTimeSeconds()for the reverse. - Excel: Use
=(A1/86400)+25569for seconds to date, or=(A1-25569)*86400for date to seconds. - Linux command line:
date -d @1700000000anddate +%s. - Online calculators: Many free sites offer epoch converters; this page’s calculator is one example.
Frequently Asked Questions
What is the difference between epoch time and Unix time?
They are essentially the same: the number of seconds since 1970-01-01 00:00:00 UTC, ignoring leap seconds. “Unix time� is the standard term, while “epoch time� refers to the same concept. Some systems use milliseconds or nanoseconds, so always check the unit.
Why does my epoch converter show a different date than Excel?
Excel uses a serial date system starting from 1900, not 1970. If you enter a Unix timestamp directly into Excel and format it as a date, you’ll get a wrong result. Use the conversion formulas above to translate between the two systems.
How do I convert epoch time to local time?
Epoch time is UTC. To get local time, add or subtract your timezone offset (e.g., for Eastern Standard Time, subtract 5 hours). Many online converters automatically display both UTC and local time. In programming, use a library like DateTimeOffset in .NET or datetime.fromtimestamp in Python.
What is the Year 2038 problem?
Many systems store epoch time as a signed 32-bit integer, which maxes out at 2,147,483,647 seconds. This occurs on January 19, 2038. After that, the integer overflows and becomes negative, causing errors. 64-bit systems are safe for billions of years.
Can I convert epoch time in Excel without a formula?
Yes, you can use the built-in Power Query or paste the timestamp and use the “From Unix Time� option in the data type menu (in newer Excel versions). Alternatively, use a custom function or an online converter and paste the result.
What is the difference between seconds and milliseconds in epoch time?
Seconds are the standard Unix time; milliseconds are 1/1000 of a second. Many APIs return milliseconds because they are more precise. To convert milliseconds to seconds, divide by 1000. Always check the number of digits: 10 digits = seconds, 13 digits = milliseconds.
Related
Formula used
in t | Epoch seconds | s | 1700000000 | 0 in d | Date (YYYY-MM-DD) | - | 2023-11-14 | 0 in h | Time (HH:MM:SS) | - | 22:13:20 | 0 out epoch | Epoch seconds | s | (d - 25569) * 86400 + (h_hour * 3600 + h_min * 60 + h_sec) | 0 out date | Date and time (UTC) | - | t / 86400 + 25569 | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.