您可以轻松更改Excel(Excel)工作表中任何单元格的格式,以让应用程序知道预期的数据类型。两种常用的格式是日期和时间。
事实上,将日期和时间插入Excel是如此常见,Microsoft内置了一些快捷方式和功能来帮助您将这些类型的数据添加到工作表中。了解如何将固定和动态日期和时间戳快速添加到Excel 中(Excel)。
固定日期和时间
许多人经常使用Excel来跟踪库存、发票、收入/费用以及需要静态记录日期和时间的各种其他用途。Excel有一些内置的快捷方式,可以让添加当前日期和时间成为一项快速的家务活。
假设(Suppose)您打开了一个新的Excel工作表,并且您想要开始添加一些与今天日期相关的数据。您可以使用这些快捷方式,而不是输入它。要将当前日期添加到单元格,首先单击要在工作表中显示日期的单元格。按住Ctrl键并点击; (分号)(; (semicolon))键。这会将当前日期放入任何活动单元格中。
要插入当前时间,请单击要存储当前时间的单元格。按住Ctrl和Shift键并按; (分号)(; (semicolon))键。这会将当前时间放入单元格中。
要将当前日期和当前时间都插入到同一个单元格中,请单击工作表中您希望日期和时间所在的单元格。按住Ctrl键并按; 钥匙。现在,按空格键(space bar)并按住Ctrl和Shift键,然后按; 钥匙。
请注意,尽管您将当前日期和时间都插入到单元格中,但这些值永远不会改变。要插入动态日期,您需要使用 Excel 的内置函数。
动态日期和时间
动态日期和时间可能看起来是静态的,但实际上在打开(Dynamic)Excel文件或计算工作表中的公式时会更改为当前日期和时间。您可能需要动态而不是静态日期或时间的原因有很多。
首先,如果您的任何公式依赖于当前日期或时间,使用动态函数可以帮助您避免每次打开文件或运行新计算时都必须插入更新的信息。其次(Second),通过在另一个包含计算的单元格旁边放置一个动态日期或时间,您可以立即知道上次进行计算的时间。
要将动态日期戳插入Excel,请在任何单元格中输入以下公式:
=TODAY()
Excel会立即将当前日期放入该单元格。每次打开工作簿或进行新计算时,Excel都会将单元格更新为当前日期。
要将动态日期和时间戳插入Excel,请在任何单元格中输入以下公式:
=NOW()
Excel会立即将当前日期和时间放入该单元格。每次打开工作簿或在工作表中进行新计算时,Excel都会使用当前日期和时间更新单元格。
不幸的是,没有仅将动态时间戳插入Excel的功能。但是,您可以更改单元格的格式以使NOW函数仅显示时间。单击功能区上的(Ribbon)主页(Home)选项卡并找到标有编号(Number)的部分。单击下拉菜单(drop-down menu)并从菜单选项中选择时间(Time)。
根据您的需要,您可以在Excel(Excel)中插入静态或动态日期和时间戳,以帮助您进行计算或跟踪上次进行计算的时间。确保您选择了正确的,这样您就不会使用Excel的内置和自定义公式无意中做出错误的计算。享受!
Quickly Add Date and Time Stamps to an Excel Worksheet
You can easily change the format of any cell in an Excel worksheet to let the apрlication know what type of data tо expect. Two often used formats are the date and time.
In fact, inserting the date and time into Excel is so common, Microsoft built in a few shortcuts and functions to help you add these types of data into your worksheet. Learn how to add both fixed and dynamic date and time stamps quickly into Excel.
Fixed Dates and Time
Many people often use Excel to keep track of inventory, invoices, income/expenses, and a variety of other uses that require statically recording the date and time. Excel has some built in shortcuts to make adding the current date and time a quick chore.
Suppose you have a new Excel worksheet open and you want to start adding some data that is tied to today’s date. Rather than typing it in, you can use these shortcuts. To add the current date to a cell, begin by clicking on the cell where you want to date to be in your worksheet. Hold down the Ctrl key and hit the ; (semicolon) key. That will place the current date into any active cell.
To insert the current time, click on the cell where you want to store the current time. Hold down both the Ctrl and Shift keys and press the ; (semicolon) key. That will place the current time into the cell.
To insert both the current date and the current time into the same cell, click on the cell where you want the date and time to be in your worksheet. Hold down the Ctrl key and press the ; key. Now, hit the space bar and hold down the Ctrl and Shift keys and press the ; key.
Note that although you inserted both the current date and time into the cells, these values will never change. To insert dynamic dates, you need to use Excel’s built-in functions.
Dynamic Date and Time
Dynamic dates and times may appear to be static, but actually change to the current date and time whenever the Excel file is either opened or when formulas in the worksheet are calculated. There are several reasons why you may need a dynamic rather than a static date or time.
First, if any of your formulas are dependent on the current date or time, using a dynamic function helps you avoid having to insert updated information every time you open the file or run a new calculation. Second, by placing a dynamic date or time next to another cell that contains a calculation, you can instantly know the last time the calculation was made.
To insert a dynamic date stamp into Excel, enter the following formula into any cell:
=TODAY()
Excel will instantly put the current date into that cell. Every time you open the workbook or make a new calculation, Excel will update the cell to the current date.
To insert a dynamic date and time stamp into Excel, enter the following formula into any cell:
=NOW()
Excel will instantly put the current date and time into that cell. Every time you open the workbook or a new calculation is made in the worksheet, Excel will update the cell with the current date and time.
Unfortunately, there is no function to insert only a dynamic time stamp into Excel. However, you can change the formatting of the cell to make the NOW function display only the time. Click the Home tab on the Ribbon and locate the section labeled Number. Click on the drop-down menu and select Time from the menu options.
Depending on your needs, you can insert either static or dynamic date and time stamps into Excel to assist you in making calculations or to keep track of the last time a calculation was made. Make sure you choose the right one so you don’t inadvertently make incorrect calculations with Excel’s built in and custom formulas. Enjoy!