Excel DATEVALUE函数不适用于今天的日期 [英] Excel DATEVALUE function not working for today's date

查看:308
本文介绍了Excel DATEVALUE函数不适用于今天的日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  = DATEVALUE(TODAY())

返回:


#VALUE!


但是,如果我使用 = DATEVALUE(03-12-2012),返回:


41246


任何人都可以告诉我如何获取今天的日期的日期数字 ....

解决方案

尝试这个

  = DATEVALUE(TEXT(TODAY(),YYYY-MM-DD))

DATEVALUE 函数需要输入正确的格式。
TODAY 函数以区域设置的格式返回日期。
因此,您可以以 DATEVALUE 功能可以理解的格式格式化日期。



TODAY 函数实际上返回当前日期的值,所以把它放入一个 DATEVALUE 只是循环运行。



您只需要使用:

  = TODAY()

然后将单元格格式化为数字格式,而不是日期格式。


I need to convert today's date to number value in Excel cell Formula.

=DATEVALUE(TODAY())

Returns:

#VALUE!

But if i use =DATEVALUE("03-12-2012"), returns:

41246

Could anyone please tell me how to get date number value of today's date....

解决方案

Try this

=DATEVALUE(TEXT(TODAY(),"YYYY-MM-DD"))

The DATEVALUE function requires the input to be in the correct format. The TODAY function returns the date in the format of the regional settings. Therefore you format the date in a format the DATEVALUE function can understand.

The TODAY function actually return the value of the current date, so putting it into a DATEVALUE is just running in circles.

You should only need to use:

=TODAY()

And then format the cell to be a numeric format rather than a date format.

这篇关于Excel DATEVALUE函数不适用于今天的日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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