[英]Contenate while keeping leading zero
I have an Excel spreadsheet in which the date of certain events is stored in three columns: year, month, and day.我有一个 Excel 电子表格,其中某些事件的日期存储在三列中:年、月和日。
Year![]() |
Month![]() |
Day![]() |
---|---|---|
1734 ![]() |
04 ![]() |
08 ![]() |
1750 ![]() |
11 ![]() |
10 ![]() |
I set the format of the cell to 'custom' so as to show the leading '0' which I want to maintain.我将单元格的格式设置为“自定义”,以显示我想要保留的前导“0”。 I now want to concatenate the information in these cells so that it shows the date as follows YYYY-MM-DD.
我现在想连接这些单元格中的信息,以便它显示日期如下 YYYY-MM-DD。 I'm using this formulate to achieve that:
我正在使用这个公式来实现:
=CONCAT(B2, "-", C2, "-", D2)
Annoyingly, however, it doesn't maintain the leading zero (the result is: 1734-4-8 and 1750-11-10, respectively).然而,令人讨厌的是,它不保留前导零(结果分别是:1734-4-8 和 1750-11-10)。 Does anyone know how to concatenate the data from these cells while maintaining the leading zero?
有谁知道如何在保持前导零的同时连接这些单元格中的数据?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.