Excel日期函数咨询及日期格式转换需求:20160711转07/11/2016
Hey there! Let's break down your Excel date-related questions clearly:
1. 常用Excel日期函数梳理
Here are some practical date functions you'll rely on regularly, with quick use cases:
DATE(year, month, day): Builds a standard date. For example,=DATE(2024,5,20)returns 2024/5/20 (display format depends on cell settings)TODAY(): Returns the current system date, updating automatically every day. Perfect for dynamic date references like calculating days since a certain dateNOW(): Returns the current date and time, also auto-updatingDATEDIF(start_date, end_date, unit): Calculates the interval between two dates. For instance,=DATEDIF(A1,TODAY(),"Y")calculates age, "M" for month difference, "D" for day differenceYEAR(date)/MONTH(date)/DAY(date): Extracts the year, month, or day from a date. Like=YEAR(A1)pulls 2016 from a converted 20160711 dateEDATE(start_date, months): Calculates the date after a specified number of months. For example,=EDATE(TODAY(),6)gets the date 6 months from now
2. Convert 20160711 format to 07/11/2016 (Easy Methods)
If your data is in pure number format (cell shows 20160711, not text), here are two straightforward ways:
Method 1: Formula Approach (Flexible for Batch Processing)
Enter this formula in a blank cell to split the number into year/month/day and convert to a standard date:
=DATE(LEFT(A1,4), MID(A1,5,2), RIGHT(A1,2))
Press Enter, then drag the fill handle down to apply to all rows. Next, select the result column, right-click → Format Cells, go to the Number tab, choose Date, then pick the mm/dd/yyyy format.
Method 2: Text to Columns (Intuitive for Beginners)
- Select the column with the 20160711-style dates
- Click Data → Text to Columns in the menu bar
- In the first wizard step, select Fixed Width and click Next
- In the preview area, add split lines after the 4th and 6th digits (to split 2016 | 07 | 11)
- Next, select Date under Column data format and choose YMD (Year-Month-Day), then click Finish
- Finally, set the cell format to
mm/dd/yyyyas described above
内容的提问来源于stack exchange,提问作者Mike F
相关产品推荐
相关产品推荐

