将字符串转换为单元格中的日期 [英] Converting a string to a date in a cell
问题描述
所以我正在寻找的是计算一个日期(如果您将日期格式化为数字,则会看到)。
你尝试过 = DateValue()
function? p>
要包含时间值,只需将功能添加在一起:
= DateValue(A1) + TimeValue(A1)
I have 100.000 rows of data in Excel. Some of the fields are dates, but the fields in Excel are as text. I need these fields in number format including both dates AND time (e.g. 21.10.2011 13:10:50). Formatting the cells doesn't work because that doesn't change the datatype. I can pick out the date and time with formulas but not get them in the same cell.
So what I am looking for is the formula to calculate the number representation of a date (the one you see if you format a date as a number).
Have you tried the =DateValue()
function?
To include time value, just add the functions together:
=DateValue(A1)+TimeValue(A1)
这篇关于将字符串转换为单元格中的日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!