Two Methods to Separate Date and Time in Excel
Welcome to our guide on how to separate date and time in Excel. In this blog, we will explore two dynamic methods to achieve this: using the Integer function and employing Power Query. These methods are perfect for analyzing data trends such as popular class times or customer purchase times.
Let's dive in and learn how to separate date and time in Excel efficiently.
Using the Integer Function
The Integer function method is a straightforward way to separate date and time in Excel. This method keeps your data dynamic, meaning any changes in the original data will automatically update the separated date and time.
YouTube Video: 2 Methods to Separate DATE and TIME in Excel
2 Methods to Separate DATE and TIME in Excel - YouTube
Step-by-Step Guide
First, let's look at how to use the Integer function to separate the date and time from a single field.
- In column B, you have the class Date and Time listed. To extract the date, you will use the Integer function. In column E, type =INT(B2) and press Enter.
- The Integer function will give you the date. To format it properly, highlight the column, go to the Home tab, and select Short Date in the Number group. This ensures the dates are displayed correctly.
- To extract the time, use the formula =B2-INT(B2) in column F. This will leave you with just the time.
- Highlight column F and format it as Time in the Number group. Now, you have the date and time separated.



Analyzing Data with PivotTable
One of the main reasons to separate date and time is to analyze data trends. In our example, we want to determine the most popular time for training classes. You could also use Time to find out when most customers place orders, or any time related field.
- Select your data and insert a PivotTable. Drag the Time field to the Rows area and the Class Date to the Values area. This will give you a count of classes at different times.
- The PivotTable shows that 10 AM is the most popular time, with 62 people signing up for classes.

Using Power Query
Power Query is another excellent method to separate date and time in Excel. This method is highly dynamic and allows for easy data refreshes, making it ideal for large datasets.
Step-by-Step Guide
Let's explore how to use Power Query to separate date and time.
- Click on your data and go to the Data tab. Select From Table/Range under the Get and Transform Data group. Power Query will launch.

- In Power Query, select the column with the class date. Go to the Add Column tab and choose Date Only from the Date & Time group. This will extract the date.

- Repeat the process to extract the time. Select the column again, go to the Add Column tab, and choose Time Only from the Date & Time group.

- Once you have separated the date and time, go to the Home tab and select Close & Load To. Choose to load the data into a new table in Excel.

Refreshing Data with Power Query
One significant advantage of using Power Query is the ability to refresh data easily. If your original data changes, you can quickly update the separated date and time.
- After adding new records to your original data, go to the Queries and Connections pane in Excel. Right-click on your query and select Refresh.

- The data will update, reflecting any changes made in the original dataset.

Conclusion
Separating date and time in Excel can be efficiently done using the Integer function or Power Query. Both methods have their advantages, with Power Query offering more dynamic capabilities and easier data refreshes.
We hope you found this guide helpful. Feel free to subscribe to our channel for more Excel tips and tricks. Let us know in the comments which method you prefer: Integer function or Power Query.
Thank you for reading!