在Excel中将日期与字符串连接 [英] Concatenating date with a string in Excel

查看:536
本文介绍了在Excel中将日期与字符串连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Excel中有两个单元格.一个有一个字符串,另一个有一个日期.在第三个单元格中,我想将日期和字符串放在一起.例如:

I have two cells in Excel. one has a string and the other one has a date. in the third cell I want to put the date and the string together. For example:

A1 = "This "
A2 = "03/03/1982"

我希望A3为:

This 03/03/1982

当我尝试将其放在A3公式中时:= A1 & A2它返回日期的一些有趣的数值,但没有给我真实的日期.

when I try to put this in the A3 formula: = A1 & A2 it returns some funny numerical value for the date and does not give me the literal date.

推荐答案

不知道这是否是最好的方法,但我会这样做:

Don't know if it's the best way but I'd do this:

=A1 & TEXT(A2,"mm/dd/yyyy")

那应该将日期格式化为所需的字符串.

That should format your date into your desired string.

您看到的那个有趣的数字是1899年12月31日到您的约会之间的天数.这就是Excel存储日期的方式.

That funny number you saw is the number of days between December 31st 1899 and your date. That's how Excel stores dates.

这篇关于在Excel中将日期与字符串连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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