简体   繁体   English

Excel 问题中的日、月、年格式

[英]Day, Month, Year format in Excel Issues

As part of my data analysis project in R this semester, I need to make a boxplot for the THY stock.作为本学期 R 数据分析项目的一部分,我需要为 THY 股票制作箱线图。 I have a csv file that contains everything that I need to work with, however, I can't figure out why I can't tidy this up a little nicer in Excel before importing to R. I've tried the basic wrangling/tidying stuff that I learned this semester, but I am at a loss.我有一个 csv 文件,其中包含我需要使用的所有内容,但是,我不明白为什么在导入到 R 之前我不能在 Excel 中将其整理得更好一些。我已经尝试了基本的整理/整理这学期我学到的东西,但我不知所措。

This is what I'm trying to accomplish:这就是我想要完成的: Excel 时间格式

I managed to build the Day, Month, and Year columns very easily using =DAY(A2) , =MONTH(A2) , and =YEAR(A2) commands.我设法使用=DAY(A2)=MONTH(A2)=YEAR(A2)命令非常轻松地构建了日、月和年列。

However, with the new csv file I downloaded from Yahoo Finance, I get this:但是,使用我从雅虎财经下载的新 csv 文件,我得到了这个: 我遇到的问题。

I used the same commands, =DAY(A2) and I can't figure out what I'm doing wrong.我使用了相同的命令=DAY(A2)并且我无法弄清楚我做错了什么。 Can someone please tell me what I'm doing wrong?有人可以告诉我我做错了什么吗?

Without your excel file I can't be certain, but I'm pretty sure you have a formatting issue.没有您的 excel 文件,我无法确定,但我很确定您有格式问题。

Change the format of column B to 'General'.将 B 列的格式更改为“常规”。

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

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