简体   繁体   English

如何将月份和日期添加到 excel 中的编号年份?

[英]How to add month and day to a numbered year in excel?

I have a column of years, 2000, 1990 > 900 (0900) > 1876 etc.... However I needed to have it in a date format eg 01/01/2000, 01/01/900 (01/01/0900).我有一列年份,2000、1990 > 900 (0900) > 1876 等....但是我需要以日期格式设置它,例如 01/01/2000、01/01/900 (01/01/0900 )。 I can't work out how to do this.我不知道该怎么做。 I can only see formulas which add days and months which are already in the format I would like.我只能看到添加日期和月份的公式,这些公式已经采用了我想要的格式。 I only need it as 01/01 to input to QGIS as a csv file.我只需要它作为 01/01 作为 csv 文件输入到 QGIS。

Dates are represented in Excel by real numbers.日期在 Excel 中用实数表示。 The integer part (to the left of the decimal place) is the number of days since 12/30/1899. integer 部分(小数点左侧)是自 1899 年 12 月 30 日以来的天数。 The fractional part (to the right of the decimal place) is the fraction of the day.小数部分(小数点右侧)是一天中的小数部分。 .5 = noon, .75 = 6pm, etc. How these numbers appear in the worksheet depends on the number format of the cell. .5 = 中午,0.75 = 下午 6 点等。这些数字在工作表中的显示方式取决于单元格的数字格式 So if your cell value is 36526 (or 1/1/2000) and the number format is "mm/dd/yyyy" you will see '01/01/2000' in the cell.因此,如果您的单元格值为 36526(或 2000 年 1 月 1 日)并且数字格式为“mm/dd/yyyy”,您将在单元格中看到“01/01/2000”。 If the number format is "mm/dd", you will see '01/01' in the cell.如果数字格式为“mm/dd”,您将在单元格中看到“01/01”。

I don't understand what you mean by "I only need it as 01/01 to input to QGIS as a csv file" but if you show me some code, and explain how the results you're getting differ from the results you want, I can probably help get you there.我不明白您所说的“我只需要将它作为 01/01 作为 csv 文件输入到 QGIS”是什么意思,但是如果您给我看一些代码,并解释您得到的结果与您想要的结果有何不同,我可能可以帮助你到达那里。

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

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