如何将字符串与DATE()连接?

时间:2012-07-28 05:10:57

标签: excel

在Excel中,我试图让单元格看起来像:

by no later than August 27, 2012

当我尝试将字符串与DATE连接起来时,例如:

="by no later than " & DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY()))

我得到这样的输出:

by no later than 41118

如何显示日期而不是整数?

3 个答案:

答案 0 :(得分:15)

DATE构建日期时间戳。您需要将其转换为字符串。有关如何操作,请参阅此问题:

它看起来像这样:

=TEXT(DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY())), "DD/MM/YYYY hh:mm:ss")

答案 1 :(得分:6)

在今天的日期你根本不需要DATE功能,你可以只使用

="by no later than "&TEXT(TODAY(),"mmmm d, yyyy")

答案 2 :(得分:-3)

如果您将包含号码(41118)的单元格格式化为Date,那么您将获得27.8.2012。简单!