Converting timestamp to date in excel

I have a very large excel spread sheet that has a column of time stamps. Does anyone know convert that over to a date? Is there a function I can use? I tried format cell date but that doesn’t work. My file is 91,568 KB. If there is a simpler way to this that would be great. I’m open to ideas.

Thank you in advance :)

P.S.
I don’t know any programming languages

asked Apr 17, 2013 at 21:50

user10165's user avatar

3

A timestamp is the elapsed time since Epoch time (01/01/1970), so basically we have to convert this time in days, and add the epoch time, to get a valid format for any Excel like spreadsheet software.

  • From a timestamp in milliseconds (ex: 1488380243994)

    use this formula:

    =A1/1000/86400+25569
    

    with this formater:

    yyyy-mm-dd hh:mm:ss.000
    
  • From a timestamp in seconds (ex: 1488380243)

    use this formula:

    =A1/86400+25569
    

    with this formater:

    yyyy-mm-dd hh:mm:ss
    

Where A1 is your column identifier.
Given custom formaters allow to not loose precision in displayed data, but you can of course use any other date/time one that corresponds to your needs.

answered Oct 18, 2018 at 14:21

Donatello's user avatar

DonatelloDonatello

3,4153 gold badges31 silver badges38 bronze badges

1

below formula worked form me in MS EXEL

=TEXT(CELL_VALUE/24/60/60/1000 + 25569,"YYYY-MM-DD HH:MM")

CELL_VALUE is timestamp in milliseconds

here is explanation for text function.

answered Nov 22, 2018 at 10:31

ranjeetcao's user avatar

ranjeetcaoranjeetcao

1,7232 gold badges20 silver badges28 bronze badges

1

If you get a Error 509 in Libre office you may replace , by ; in the DATE() function

=(((COLUMN_ID_HERE/60)/60)/24)+DATE(1970;1;1)

answered Apr 24, 2014 at 20:36

Karl Adler's user avatar

Karl AdlerKarl Adler

15.3k10 gold badges69 silver badges86 bronze badges

1

If your file is really big try to use following formula:
=A1 / 86400 + 25569

A1 should be replaced to what your need.
Should work faster than =(((COLUMN_ID_HERE/60)/60)/24)+DATE(1970,1,1) cause of less number of calculations needed.

answered Feb 22, 2014 at 17:29

Alexey Matskoff's user avatar

1

=(((A1/60)/60)/24)+DATE(1970,1,1)+(-5/24)

assuming A1 is the cell where your time stamp is located and dont forget to adjust to account for the time zone you are in (5 assuming you are on EST)

answered Apr 15, 2014 at 19:51

Lana's user avatar

LanaLana

711 silver badge1 bronze badge

This DATE-thing won’t work in all Excel-versions.

=CELL_ID/(60 * 60 * 24) + "1/1/1970"

is a save bet instead.
The quotes are necessary to prevent Excel from calculating the term.

answered Sep 19, 2016 at 6:21

Stephan Weinhold's user avatar

Stephan WeinholdStephan Weinhold

1,6151 gold badge28 silver badges37 bronze badges

Be aware of number of digits in epoch time. Usually they are ten (1534936923) ,then use:

=(A1 / 86400) + 25569    

For thirteen digits (1534936923000) of epoch time adjust the formula:

=(LEFT(A1,LEN(A1)-3) / 86400) + 25569    

to avoid

###################################

Dates or times that are negative or too large display as ######

See more on https://www.epochconverter.com/

answered Jul 23, 2019 at 7:15

Daniel Horvath's user avatar

Daniel HorvathDaniel Horvath

3411 gold badge3 silver badges13 bronze badges

The answer of @NeplatnyUdaj is right but consider that Excel want the function name in the set language, in my case German. Then you need to use «DATUM» instead of «DATE»:

=(((COLUMN_ID_HERE/60)/60)/24)+DATUM(1970,1,1)

answered Oct 18, 2018 at 14:44

ownking's user avatar

ownkingownking

1,9461 gold badge23 silver badges34 bronze badges

AD ticks to datetime format: =A1/864000000000 — 109205

answered Dec 15, 2015 at 13:20

Evgeniy Nikulov's user avatar

i got result from this in LibreOffice Calc :

=DATE(1970,1,1)+Column_id_here/60/60/24

answered Jan 31, 2016 at 7:30

Samir Sayyad's user avatar

This worked for me:

=(col_name]/60/60/24)+(col_name-1)

deblocker's user avatar

deblocker

7,6092 gold badges23 silver badges57 bronze badges

answered Mar 3, 2017 at 8:28

Aparna Kamath's user avatar

Use this simple formula. It works.

Suppose time stamp in A2:

=DATE(YEAR(A2),MONTH(A2),DAY(A2))

4b0's user avatar

4b0

21.7k30 gold badges95 silver badges140 bronze badges

answered Dec 23, 2019 at 8:12

Hassan Alsada's user avatar

1

Unix timestamp is also called Epoch time or POSIX time which is wildly used in many operating systems or file formats. This tutorial is talking about the conversion between date and Unix timestamp in Excel.

Convert date to timestamp

Convert date and time to timestamp

Convert timestamp to date

More tutorials about datetime conversion…


arrow blue right bubble Convert date to timestamp

To convert date to timestamp, a formula can work it out.

Select a blank cell, suppose Cell C2, and type this formula =(C2-DATE(1970,1,1))*86400 into it and press Enter key, if you need, you can apply a range with this formula by dragging the autofill handle. Now a range of date cells have been converted to Unix timestamps.
doc-convert-date-unix-1


doc converttime 1


arrow blue right bubble Convert date and time to timestamp

There is a formula that can help you convert date and time to Unix timestamp.

1. Firstly, you need to type the Coordinated Universal Time into a cell, 1/1/1970. See screenshot:
doc-convert-date-unix-2

2. Then type this formula =(A1-$C$1)*86400 into a cell, press Enter key, then if you need, drag the autofill handle to a range with this formula. See screenshot:
doc-convert-date-unix-3

Tips: In the formula, A1 is the date and time cell, C1 is the coordinate universal time you typed.


arrow blue right bubble Convert timestamp to date

If you have a list of timestamp needed to convert to date, you can do as below steps:

1. In a blank cell next to your timestamp list and type this formula =(((A1/60)/60)/24)+DATE(1970,1,1), press Enter key, then drag the auto fill handle to a range you need.
doc-convert-date-unix-4

2. Then right click the cells used the formula, and select Format Cells from the context menu, then in the popping Format Cells dialog, under Number tab, click Date in the Category list, then select the date type in the right section.
doc-convert-date-unix-5

3. Click OK, now you can see the Unix timestamps have been converted to dates.
doc-convert-date-unix-6

Notes:

1. A1 indicates the timestamp cell you need.

2. This formula also can use to convert timestamp series to date and time, just format the result to the date and time format.

3. The above formula converts 10-digits number to a standard datetime, if you want to convert 11-digits number, or 13-digits number, or 16-digits number to a standard datetime in Excel, please use formula as below:

Convert 11-digits number to date: =A1/864000+DATE(1970,1,1)

Convert 13-digits number to date: =A1/86400000+DATE(1970,1,1)

Convert 16-digits number to date: =A1/86400000000+DATE(1970,1,1)

For different lengths of number which needed to be converted to datetime, just change the number of zeros of the divisor in the formula to correctly get the result.


Relative Articles:

  • How to convert date time from one time zone to another in Excel?
    This article will show you how to convert date time from one time zone to another in Excel.

  • How to split date and time from a cell to two separated cells in Excel?
    For instance, you have a list of data mixed with date and time, and you want to split each of them into two cells, one is date and another is time as below screenshots shown. Now this article provides you two quick methods to solve it in Excel.

  • How to convert date/time format cell to date only in Excel?
    If you want to convert date-time format cell to date value only such as 2016/4/7 1:01 AM to 2016/4/7, this article can help you.

  • How to remove time from date in Excel?
    If there has a column of date with time stamp, such as 2/17/2012 12:23, and you don’t want to retain the time stamp and want to remove the time 12:23 from the date and only leave the date 2/17/2012. How could you quickly remove time from date in mulitple cells in Excel?

  • How to combine date and time into one cell in Excel?
    There are two columns in a worksheet, one is the date, the other is time. Is there any way to quickly combine these two columns into one, and keep the time format? Now, This article introduces two ways in Excel to combine date column and time column into one and keep the time format.


The Best Office Productivity Tools

Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails…
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns… Prevent Duplicate Cells; Compare Ranges
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select…
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more…
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic…
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF
  • More than 300 powerful features. Supports Office / Excel 2007-2021 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.

kte tab 201905


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!

officetab bottom

13 Answers

  1. From a timestamp in milliseconds (ex: 1488380243994) use this formula: =A1/1000/86400+25569. with this formater: yyyy-mm-dd hh:mm:ss.000.
  2. From a timestamp in seconds (ex: 1488380243) use this formula: =A1/86400+25569. with this formater: yyyy-mm-dd hh:mm:ss.

Contents

  • 1 How do I turn a timestamp into a date?
  • 2 How do I convert a timestamp to a date in sheets?
  • 3 How do I convert time to epoch?
  • 4 What is the format of timestamp?
  • 5 What is the Datevalue function in Excel?
  • 6 How do I extract the date from a time stamp?
  • 7 How do I manually convert a timestamp to a date?
  • 8 How do I convert a timestamp to a date in SQL?
  • 9 What is epoch date?
  • 10 How do I format a timestamp in Excel?
  • 11 How do I change the format of the date in Excel?
  • 12 How do you format a timestamp?
  • 13 How do I convert Datevalue to date?
  • 14 How do I extract date from datetime in Excel?
  • 15 How do I convert 8 digits to dates in Excel?
  • 16 How do I convert a timestamp to a MONTH in Excel?
  • 17 How do I extract the day from a timestamp in Excel?
  • 18 What is Eomonth formula in Excel?
  • 19 How do I convert timestamp to time in Excel?
  • 20 How do I convert UTC timestamp to local time in Excel?

How do I turn a timestamp into a date?

Let’s see the simple example to convert Timestamp to Date in java.

  1. import java.sql.Timestamp;
  2. import java.util.Date;
  3. public class TimestampToDateExample1 {
  4. public static void main(String args[]){
  5. Timestamp ts=new Timestamp(System.currentTimeMillis());
  6. Date date=new Date(ts.getTime());
  7. System.out.println(date);
  8. }

How do I convert a timestamp to a date in sheets?

1 Answer. You can extract the date portion of the timestamp using MID() then use DATEVALUE() to convert it to date format. Then use Format > Number > Date command.

How do I convert time to epoch?

The Unix epoch is the time 00:00:00 UTC on 1 January 1970. UNIX epoch time can be converted into local time by dividing it by 86400 and adding result to epoch date in days.

What is the format of timestamp?

The default format of the timestamp contained in the string is yyyy-mm-dd hh:mm:ss. However, you can specify an optional format string defining the data format of the string field.

What is the Datevalue function in Excel?

Description. The DATEVALUE function is helpful in cases where a worksheet contains dates in a text format that you want to filter, sort, or format as dates, or use in date calculations. To view a date serial number as a date, you must apply a date format to the cell.

PostgreSQL – How to extract date from a timestamp?

  1. SELECT DATE(column_name) FROM table_name;
  2. SELECT ‘2018-07-25 10:30:30’::TIMESTAMP::DATE;
  3. SELECT DATE(SUBSTRING(‘2018-07-25 10:30:30’ FROM 1 FOR 10));

How do I manually convert a timestamp to a date?

In this article, we will show you how to convert UNIX timestamp to date.
Convert Timestamp to Date.

1. In a blank cell next to your timestamp list and type this formula =R2/86400000+DATE(1970,1,1), press Enter key.
3. Now the cell is in a readable date.

How do I convert a timestamp to a date in SQL?

We can convert the timestamp to date time with the help of FROM_UNIXTIME() function. Let us see an example. First, we will create a table with column of int type. Then we convert it to timestamp and again into date time.

What is epoch date?

In a computing context, an epoch is the date and time relative to which a computer’s clock and timestamp values are determined. The epoch traditionally corresponds to 0 hours, 0 minutes, and 0 seconds (00:00:00) Coordinated Universal Time (UTC) on a specific date, which varies from system to system.

How do I format a timestamp in Excel?

Insert Date and Timestamp Using NOW Function

  1. Right-click on the cell and select ‘Format cells’.
  2. In the Format Cells dialog box, select ‘Custom’ category in the Number tab.
  3. In the Type field, enter dd-mm-yyyy hh:mm:ss.
  4. Click OK.

How do I change the format of the date in Excel?

Follow these steps:

  1. Select the cells you want to format.
  2. Press Control+1 or Command+1.
  3. In the Format Cells box, click the Number tab.
  4. In the Category list, click Date.
  5. Under Type, pick a date format.

How do you format a timestamp?

The timestamp is parsed either using the default timestamp parsing settings, or a custom format that you specify, including the time zone.
Automated Timestamp Parsing.

Timestamp Format Example
yy-MM-dd HH:mm:ss,SSS 10-06-26 02:31:29,573
yy-MM-dd HH:mm:ss 10-04-19 12:00:17
yy/MM/dd HH:mm:ss 06/01/22 04:11:05

How do I convert Datevalue to date?

The DATEVALUE function in Excel converts a date in the text format to a serial number that Excel recognizes as a date. So, the formula to convert a text value to date is as simple as =DATEVALUE(A1) , where A1 is a cell with a date stored as a text string.

Extract date from a date and time

  1. Generic formula. =INT(date)
  2. To extract the date part of a date that contains time (i.e. a datetime), you can use the INT function.
  3. Excel handles dates and time using a scheme in which dates are serial numbers and times are fractional values.
  4. Extract time from a date and time.

How do I convert 8 digits to dates in Excel?

To do this, select a cell or a range of cells with the numbers you want to convert to dates and press Ctrl + 1 to open the Format Cells dialog box. On the Number tab, choose Date, select the desired date format in Type and click OK. If have any issues I will be here to help you. Thanks!

How do I convert a timestamp to a MONTH in Excel?

MONTH function in Excel – get month number from date.
This is the most obvious and easiest way to convert date to month in Excel. For example: =MONTH(A2) – returns the month of a date in cell A2. =MONTH(DATE(2015,4,15)) – returns 4 corresponding to April.

Extract the day number
The getting day number formula is as simple as the formulas above. Please do as follows. Copy and paste formula =DAY(A2) into a blank cell D2 and press Enter key. Then drag the Fill Handle down to the range to extract all day numbers from the referenced date list.

What is Eomonth formula in Excel?

Description. The Microsoft Excel EOMONTH function calculates the last day of the month after adding a specified number of months to a date. The result is returned as a serial date. The EOMONTH function is a built-in function in Excel that is categorized as a Date/Time Function.

To convert time to a number of hours, multiply the time by 24, which is the number of hours in a day. To convert time to minutes, multiply the time by 1440, which is the number of minutes in a day (24*60). To convert time to seconds, multiply the time time by 86400, which is the number of seconds in a day (24*60*60 ).

How do I convert UTC timestamp to local time in Excel?

Convert UTC/GMT time to local time with formulas
(2) The formula =A2 + (9 / 24) will return a decimal number. For converting the decimal number to time, please select the decimal number, and click Home > Number Format > Time.

Содержание

  1. Convert Unix time stamp to Excel date
  2. Related functions
  3. Summary
  4. Generic formula
  5. Explanation
  6. How Excel tracks dates time
  7. Русские Блоги
  8. Как преобразовать дату и метку времени Unix в Excel?
  9. Просмотр и редактирование с вкладками нескольких книг Excel / документов Word, таких как Firefox, Chrome, Интернет 10!
  10. Вопрос: Как преобразовать временную метку UNIX в текущую дату в Excel?
  11. Как преобразовать метку времени в дату в Excel?
  12. Как преобразовать время UNIX в нормальное время?
  13. Как преобразовать время эпохи в дату в Excel?
  14. Использует ли Excel время Unix?
  15. Какой это формат метки времени?
  16. Какая сейчас метка времени?
  17. Как мне вручную преобразовать дату в метку времени в Unix?
  18. Как рассчитывается дата эпохи?
  19. Как перевести дату во время эпохи?
  20. Как применить функцию ко всему столбцу в Excel?
  21. Как мне прочитать отметку времени Unix?
  22. Converting Timestamp to Date Excel
  23. 2 Answers 2
  24. Convert timestamp to DateTime in excel
  25. 2 Answers 2
  26. Related
  27. Hot Network Questions
  28. Subscribe to RSS

Convert Unix time stamp to Excel date

Summary

To convert a Unix timestamp to Excel’s date format, you can use a formula based on the DATE function. In the example shown, the formula in C5 is:

Generic formula

Explanation

The Unix time stamp tracks time as a running count of seconds. The count begins at the «Unix Epoch» on January 1st, 1970, so a Unix time stamp is simply the total seconds between any given date and the Unix Epoch. Since a day contains 86400 seconds (24 hours x 60 minutes x 60 seconds), conversion to Excel time can be done by dividing days by 86400 and adding the date value for January 1st, 1970.

In the example shown, the formula first divides the time stamp value in B5 by 86400, then adds the date value for the Unix Epoch, January 1, 1970. The formula evaluates like this:

When C5 is formatted with the Excel date «d-mmm-yyyy», the date is displayed as 1-Oct-2018.

How Excel tracks dates time

The Excel date system starts on January 1, 1900 and counts forward. The table below shows the numeric values associated with a few random dates:

Date Raw value
1-Jan-1900 1
28-Jul-1914 00:00 5323
1-Jan-1970 00:00 25569
31-Dec-1999 36525
1-Oct-2018 43374
1-Oct-2018 12:00 PM 43374.5

Notice the last date includes a time as well. Since one day equals 1, and one day equals 24 hours, time in Excel can represented as fractional values of 1, as shown in the table below. In order to see the value displayed as a time, a time format needs to be applied.

Источник

Русские Блоги

Как преобразовать дату и метку времени Unix в Excel?

Временная метка Unix также называется временем эпохи или временем POSIX, которое широко используется во многих операционных системах или форматах файлов. В этом руководстве обсуждается преобразование даты в метку времени Unix в Excel.

Преобразовать дату в метку времени

Просмотр и редактирование с вкладками нескольких книг Excel / документов Word, таких как Firefox, Chrome, Интернет 10!

Возможно, вы знакомы с просмотром нескольких веб-страниц в Firefox / Chrome / IE и можете переключаться между ними, легко щелкая соответствующую вкладку. Здесь вкладка Office поддерживает аналогичную обработку, позволяя просматривать несколько книг Excel или документов Word в одном окне Excel или Word и легко переключаться между ними, щелкая вкладку. ЧтобыНажмите на бесплатную 45-дневную пробную версию Office Tab!

Чтобы преобразовать дату в метку времени, вы можете использовать формулу для решения проблемы.

Выберите пустую ячейку и введите эту формулу = (A1-DATE (1970,1,1)) * 86400 Enter и нажмитевойтиKey, при необходимости, вы можете применить диапазон этой формулы, перетащив маркер автозаполнения. Теперь ряд ячеек даты преобразован в отметки времени Unix.

Преобразование даты и времени в метку времени

Существует формула, которая поможет вам преобразовать дату и время в метку времени Unix.

1. Во-первых, вам нужно ввести всемирное координированное время в ячейку 01.01.1970. Смотрите скриншот:

2. Затем введите эту формулу = (A1- $ C $ 1) * 86400 в ячейку, нажмитеВойтиKey и при необходимости используйте эту формулу, чтобы перетащить дескриптор автозаполнения в диапазон. Смотрите скриншот:

подсказки: В формуле A1 — это ячейка даты и времени, а C1 — введенная вами координата мирового времени.

Преобразовать метку времени на дату

Если у вас есть список меток времени, которые необходимо преобразовать в даты, вы можете выполнить следующие действия:

1. В пустой ячейке рядом со списком отметок времени введите эту формулу = (((A1 / 60) / 60) / 24) + ДАТА (1970,1,1), нажмитевойтиButton, а затем перетащите маркер автозаполнения в нужный диапазон.

2. Затем щелкните правой кнопкой мыши ячейку, в которой используется формула, и выберитеФормат ячейкиИз контекстного меню, а затем во всплывающемФормат ячейкиДиалоговое окно под NУмбраЯрлык, щелкнитеДатаВкатегорияСписок, а затем выберите тип даты справа.

3. НажмитеOK, Теперь вы можете видеть, что метка времени Unix была преобразована в дату.

незамедлительный:

1. A1 представляет нужную ячейку с отметкой времени.

2. Эту формулу также можно использовать для преобразования серии отметок времени в дату и время, просто отформатируйте результат в формате даты и времени.

Быстро и легко конвертируйте даты в другие форматы дат в Excel

Источник

Вопрос: Как преобразовать временную метку UNIX в текущую дату в Excel?

1. В пустой ячейке рядом со списком временных меток введите эту формулу = R2 / 86400000 + ДАТА (1970,1,1) и нажмите клавишу Enter.
3. Теперь в ячейке отображается дата, которую можно прочитать.

Как преобразовать метку времени в дату в Excel?

Чтобы преобразовать дату в метку времени, формула может вычислить это. Выберите пустую ячейку, предположим Ячейка C2, и введите в нее эту формулу = (C2-DATE (1970,1,1)) * 86400 и нажмите клавишу Enter, если вам нужно, вы можете применить диапазон с этой формулой, перетащив маркер автозаполнения.

Как преобразовать время UNIX в нормальное время?

Общая формула для преобразования метки времени UNIX в обычную дату выглядит следующим образом: = (A1 / 86400) + ДАТА (1970,1,1) где A1 — расположение номера временной метки UNIX.

Как преобразовать время эпохи в дату в Excel?

С помощью таблицы Excel вы можете легко преобразовать как временную метку Unix, так и дату. Введите эту формулу = (A1-Date (1970,1,1)) * 86400 в пустую ячейку и нажмите Enter.».

Использует ли Excel время Unix?

В Unix используется значение количество секунд, прошедших с 1 января, 1970, 00:00. Excel использует аналогичный расчет для значений даты. Однако Excel вычисляет значение даты на основе 1 января 1900 года, а Excel кодирует свои временные метки в виде долей дней, а не секунд.

Какой это формат метки времени?

Автоматический синтаксический анализ метки времени

Формат метки времени Пример
гггг-ММ-дд * ЧЧ: мм: сс 2017-07-04*13:23:55
гг-ММ-дд ЧЧ: мм: сс, SSS ZZZZ 11-02-11 16:47:35,985 +0000
гг-ММ-дд ЧЧ: мм: сс, SSS 10-06-26 02:31:29,573
гг-ММ-дд ЧЧ: мм: сс 10-04-19 12:00:17

Какая сейчас метка времени?

В специальном регистре CURRENT TIMESTAMP (или CURRENT_TIMESTAMP) указывается метка времени, основанная на чтении часов времени, когда оператор SQL выполняется на сервере приложений.

Как мне вручную преобразовать дату в метку времени в Unix?

В этой статье мы покажем вам, как преобразовать временную метку UNIX на дату.

Преобразование отметки времени в дату.

1. В пустой ячейке рядом со списком временных меток введите эту формулу = R2 / 86400000 + ДАТА (1970,1,1) и нажмите клавишу Enter.
3. Теперь в ячейке отображается дата, которую можно прочитать.

Как рассчитывается дата эпохи?

Умножьте разницу на 86400 чтобы получить время эпохи в секундах.

Как перевести дату во время эпохи?

Преобразование из удобочитаемой даты в эпоху

долгая эпоха = новый java.text.SimpleDateFormat («ММ / дд / гггг ЧЧ: мм: сс»).parse («01 01:1970:01 ″). getTime () / 00; Отметка времени в секундах, удалите «/ 00» для миллисекунд. date +% s -d »1000 января 1000 г., 1:1980:00» Замените «-d» на «-ud», чтобы ввести время по Гринвичу / всемирному координированному времени.

Как применить функцию ко всему столбцу в Excel?

Выделите ячейку с формулой и соседние ячейки, которые хотите заполнить. Нажмите «Главная»> «Заливка» и выберите «Вниз», «Вправо», «Вверх» или «Влево». Сочетание клавиш: вы также можете нажать Ctrl + D , чтобы заполнить формулу в столбце, или Ctrl + R, чтобы заполнить формулу справа в строке.

Как мне прочитать отметку времени Unix?

Чтобы найти текущую временную метку unix используйте параметр% s в команде даты. Параметр% s вычисляет временную метку unix, находя количество секунд между текущей датой и эпохой unix. Вы получите другой результат, если запустите указанную выше команду даты.

Источник

Converting Timestamp to Date Excel

I have a timestamp column that comes in the format «Aug 01 2016 — 13:46». To format it like a date, because I don’t need the timestamp, I’m getting rid of the spaces and the timestamp,

Where I’m grabbing the right 4 digits as the year, doing a vlookup for the month string, and then getting the middle digits for the day (the IF statement is because occasionally the month will be longer than 4 characters). My result is «1/12/05» Cannot figure out what I’m doing wrong, and would so appreciate any help! Would typically use strftime in R, but the dataset is tiny 🙂

2 Answers 2

There may be a much shorter version but I am curious about the different format/s you do not show (and what is in H2:I13) and I have tried to ‘respect’ your approach.

A shorter version (without the need for a VLOOKUP):

The longer version above uses a lookup table (H2:I13) where the first three characters of the date stamp are converted to a number representing the relevant month. This avoids what might otherwise be complication from length inconsistency in the month indication.

The year and the day are picked out by their relationship to the reference point of a space/dash pair. Relative to that the year will start four characters sooner (and is of length four).

The space/dash pair (just the dash would have been sufficient as a reference point) starts at the twelfth character for the example, as located by:

From this result (ie 12 ) 5 is subtracted to countback to the start of the year. (Actually the space before the start of the year, but that does not matter). From the space in front of the year, the year is five characters long, this being the length of the string extracted from A2 by:

The day ( 01 for the example) is extracted in a similar fashion and then the three pieces (Year, VLOOKUP result and Day) and fed as parameters into the =DATE function.

The shorter version avoids the need for a lookup table by concatenating, in the middle of Year and Day (extracted in a similar way as for the long version), with the first three characters of the datestamp, obtained from:

surrounded by — on each side.

(see LEFT which is effectively a slightly simplified form of MID as used elsewhere).

The result is a string but in a format recognised by Excel and one that the handy function =DATEVALUE can convert into a Date/Time value.

This would be a lot easier were the data more consistent (ie always three letters for Month).

Источник

Convert timestamp to DateTime in excel

Is there any way in Excel to convert the timestamp in the format

to readable format (Human-friendly)?

1-Oct-2018 12:00 PM

2 Answers 2

The seconds look like a UNIX timestamp.
UNIX time started counting seconds 1970.
To convert it you need to start with the date 1970-01-01 and add the days as a float.

I found the solution — There is a feature called «Text to column»

Hot Network Questions

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

Site design / logo © 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA . rev 2023.3.20.43331

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

Источник

Summary

To convert a Unix timestamp to Excel’s date format, you can use a formula based on the DATE function. In the example shown, the formula in C5 is:

=(B5/86400)+DATE(1970,1,1)

Generic formula

Explanation 

The Unix time stamp tracks time as a running count of seconds. The count begins at the «Unix Epoch» on January 1st, 1970, so a Unix time stamp is simply the total seconds between any given date and the Unix Epoch. Since a day contains 86400 seconds (24 hours x 60 minutes x 60 seconds), conversion to Excel time can be done by dividing days by 86400 and adding the date value for January 1st, 1970.

In the example shown, the formula first divides the time stamp value in B5 by 86400, then adds the date value for the Unix Epoch, January 1, 1970. The formula evaluates like this:

=(B5/86400)+DATE(1970,1,1)
=(1538352000/86400)+25569
=43374

When C5 is formatted with the Excel date «d-mmm-yyyy», the date is displayed as 1-Oct-2018.

How Excel tracks dates time

The Excel date system starts on January 1, 1900 and counts forward. The table below shows the numeric values associated with a few random dates:

Date Raw value
1-Jan-1900 1
28-Jul-1914 00:00 5323
1-Jan-1970 00:00 25569
31-Dec-1999 36525
1-Oct-2018 43374
1-Oct-2018 12:00 PM 43374.5

Notice the last date includes a time as well. Since one day equals 1, and one day equals 24 hours, time in Excel can represented as fractional values of 1, as shown in the table below. In order to see the value displayed as a time, a time format needs to be applied.

Hours Time Fraction Value
3 3:00 AM 3/24 0.125
6 6:00 AM 6/24 0.25
4 4:00 AM 4/24 0.167
8 8:00 AM 8/24 0.333
12 12:00 PM 12/24 0.5
18 6:00 PM 18/24 0.75
21 9:00 PM 21/24 0.875
24 12:00 AM 24/24 1

Dave Bruns Profile Picture

AuthorMicrosoft Most Valuable Professional Award

Dave Bruns

Hi — I’m Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.

Great site — amazingly clear but with a lot of depth in terms of the explanations.

Get Training

Quick, clean, and to the point training

Learn Excel with high quality video training. Our videos are quick, clean, and to the point, so you can learn Excel in less time, and easily review key topics when needed. Each video comes with its own practice worksheet.

View Paid Training & Bundles

Help us improve Exceljet

Понравилась статья? Поделить с друзьями:
  • Converting from xlsx to xls in excel
  • Converting from pdf to word format
  • Converting files from pdf to excel
  • Converting excel to powerpoint
  • Convert text to table excel