在Google Sheets中将Unix Epoch时间转换为日期 [英] Convert Unix Epoch Time to Date in Google Sheets

查看:112
本文介绍了在Google Sheets中将Unix Epoch时间转换为日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的工作表中有一列unix纪元时间(以秒为单位):1500598288

I have a sheet with a column of unix epoch times (in seconds): 1500598288

如何将这些日期转换为正常日期?

How can I convert these into normal dates?

推荐答案

最简单的方法(不需要任何JS编程)是通过公式,每天除以86400秒,再加上1970年1月1日。例如,以下给出了2017年7月21日:

The simplest way, not requiring any JS programming, would be through a formula, dividing by 86400 seconds per day and adding to January 1, 1970. For example the following gives 21 July 2017:

=1500598288/86400+date(1970,1,1)

要转换整列数字,只需使用ARRAYFORMULA:

To convert a whole column of numbers, just use ARRAYFORMULA:

=arrayformula(A:A/86400+date(1970,1,1))

这篇关于在Google Sheets中将Unix Epoch时间转换为日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆