简体   繁体   English

Excel日期和文本格式

[英]Excel date and text Format

I have an excel sheet in which there is a column of data like the one given below 我有一张Excel工作表,其中有一列数据如下所示

Last day of this week corresponding to Sunday is 41280
Last day of this week corresponding to Sunday is 41287
Last day of this week corresponding to Sunday is 41294
Last day of this week corresponding to Sunday is 41301
Last day of this week corresponding to Sunday is 41308
Last day of this week corresponding to Sunday is 41315
Last day of this week corresponding to Sunday is 41322

This is a file from our client. 这是来自我们客户的文件。 But we are expecting the last numeric values to be of date format. 但是我们期望最后一个数值是日期格式。

Last day of this week corresponding to Sunday is 1/6/2013

I tried changing the format to date, but it is not accepting 我尝试将格式更改为最新版本,但不接受

How can i achieve the same 我怎样才能达到相同

Put this formula in the next column along (formula assumes your text is in column A): 将此公式放在下一列中(公式假定您的文本在A列中):

=TEXT(RIGHT(A1, 5), "dd/MM/yyyy")

I've dropped in the UK dateformat, but of course you can go for the dateformat that suits you. 我已经选择了英国的​​日期格式,但是您当然可以选择适合自己的日期格式。

Changing the format of the cell should do the job. 更改单元格的格式应该可以完成这项工作。 So changing from Number or General to Short Date or Long Date works for me. 因此,从NumberGeneral更改为Short DateLong Date对我来说很有效。

I have a neat function that I use with a date in Excel. 我有一个整齐的函数,可以与Excel中的日期一起使用。 If I want text to appear in the same cell as the date, I use the following concatenation function. 如果希望文本与日期显示在同一单元格中,请使用以下串联函数。

What I want to see: Date of Submission: 10/17/2016 我想看的是: 提交日期:2016年10月17日

What I type in: ="Date of Submission: "&TEXT(NOW(),"MM/DD/YYYY") 我输入的内容: =“提交日期:”&TEXT(NOW(),“ MM / DD / YYYY”)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM