简体   繁体   English

无法将序列号转换为日期和时间格式

[英]Cannot convert serial number to date and time format

It's just as the title says, I cannot convert the serial numbers generated from the DATE and TIME function to a Date and Time Format. 就像标题所说的那样,我无法将DATE和TIME函数生成的序列号转换为日期和时间格式。

I have this date: 27/11/2012 1:09 PM (originally typed in as text and not acknowledged as date and time, because it was aligned to the left). 我的日期是:27/11/2012 1:09 PM(最初以文本形式输入,但由于其与左侧对齐,因此未确认为日期和时间)。 So instead, I decided to use the DATE and TIME function like so: 因此,我决定像这样使用DATE和TIME函数:

=(DATE(2014,8,26) & TIME(13,27,0))

It resulted with a serial number. 结果是一个序列号。 So I googled on ways how to convert the serial number to a date format. 因此,我搜索了如何将序列号转换为日期格式的方法。 OF course, I already tried formatting a cell by right-clicking it and selecting the Date category but still no luck. 当然,我已经尝试通过右键单击单元格并选择“日期”类别来格式化单元格,但还是没有运气。

Now that I think about it, is the formula above alright? 现在我考虑一下,上面的公式还好吗? I mean is it okay to use date and time in one cell? 我的意思是可以在一个单元格中使用日期和时间吗? By the way, the dates and times were manually typed in in one cell. 顺便说一下,日期和时间是在一个单元格中手动键入的。 And I do not have an option to segregate each date and time elements per cell. 而且我没有选择来分隔每个单元格中的每个日期和时间元素。

UPDATE: So I tried doing it with just the DATE function only and the formatting worked. 更新:因此,我尝试仅使用DATE函数来执行此操作,并且格式化工作正常。 Is there any way that even the time is included? 有没有办法包括时间在内?

=(DATE(2014,8,26) + TIME(13,27,0))

使用“ +”表示日期和时间:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM