Open In App

Excel Date and Time Formats With Examples

Last Updated: 21 Mar, 2024

A

Summarize
Comments
Improve
Suggest changes
Like Article
Like
Share
Report
News Follow

Excel has a built-in time feature that is simple to use and can save you a lot of time. We can insert current Data and Time into a worksheet cell using Excel’s built-in functions. When you enter a date or time into a cell, the date and time are displayed in the cell’s default date and time format. The regional date and time settings entered in Control Panel determine this default format, which changes when those settings are changed in Control Panel. Numbers can be displayed in a variety of date and time formats, the majority of which are unaffected by Control Panel settings.

We can use Excel time features to

  • Convert time to decimal numbers
  • Add the time of two different units
  • Calculate elapsed time

Note: Elapsed time is the amount of time between the start of an event or task to its end.

Date and Time Format in Excel

Microsoft Excel supports the 1900 Date System. In the 1900 data system, the first day supported is January 1, 1900. When we enter a date, excel converts it into a sequential number which represents the number of elapsed days starting from January 1, 1900. Microsoft Excel treats time as a portion of days, and internally it is stored as a decimal fraction.

For Example:

  • 00:00:00 in Excel, stored as 0.0
  • 23:59:59 in Excel, stored as 0.99999
  • 12:00 PM in Excel, stored as 0.5

Decimal Representation of Time

In order to get the decimal representation of time in Excel: 

  • Select the Cell Containing Time and then Right-Click on it
  • Select Format Cells (Here, we are using 2:32 PM as the time in the cell)

Note: We can also use shortcut to open formatting cell popup. For this we need to select the cell containing time and press ctrl + 1.

Select Cell Containing Time and then Right-Click on it and then select Format Cells.

Fig1 –  Format Cells

  • Once we click on the Format Cells option, Excel will open a format cells dialog box
  • Select Number tab and then click on General under Category, you will see the decimal in the Sample box. 
Format cell dialog box will appear, here we need to select general under number tab.

Fig2 – Decimal representation of time

We can review the values in the Sample tab, which gives the decimal representation of the time we entered in the cell.

How To Change the Default Time Format

Microsoft Excel by default recognizes the time we enter into a cell, depending on our time zone

For example:

If we enter 3:00 PM, excel will interpret it as time and display it as 3:00 PM, 15:00, or 15:00:00 depending upon our default time format.

We enter 3:00 PM in a cell, but it shows default time format.

Fig3 – Default time format

In order to change the Time format:

  • Select a desired Cell 
  • Then press Ctrl + 1, to open the format cell dialog box 
  • Select Number tab, then in Category choose the Time option
  • You can Choose Time Format as Per Requirement.
for changing the time format again dialog box appears here select time under number category.

Fig4 – Changing default time format

Once we’ve selected our desired time format, we need to click on the OK button. Excel will change the default time format to our specified time format.

Excel will change the default time format to our specified time format.

Fig5 – Time format output

How to Create a Custom Date and Time Format in Excel

Excel provides a lot of useful time format features, one of them is creating a custom time format. In order to create a custom time format, We need to open the time format cell tab.  

  • Select a desired Cell 
  • Press Ctrl + 1 to open Format Cells dialog box.
  • Select Number tab and in Category select the Custom option 
  • Under Type, you can Fill the Desired Time Format.
  • Review the Sample value to check if it’s formatted as desired.
  • Click OK to save the changes.

For example: 

To format a date time value like 1-Jan-2023 10:30 AM, utilize this code: d-mmm-yyyy h:mm AM/PM.

For custom time format again need to open the dialog box and then select number and choose custom and in type write any time format.

Fig6 – Custom time format

Once we fill in our desired custom time format (Here, we are using h:mm AM/PM), Excel will update the default time format to our specified time format.

The custom created time format will be in the Type list the next time you need it.

Excel will change the default time format to our specified time format.

Fig7 – Custom time format output

Add Today’s Date & Current Time using NOW() Function

Excel provides an in-built NOW() function, which is used to retrieve today’s date and the current system time.

NOW() function features:

  • NOW() function retrieves present date (today’s date)
  • It retrieves the current system clock time.
  • It is a volatile function that causes the cell with the NOW() function to recalculate the current date and time, every time the worksheet is re-opened.
  • In order to force excel to recalculate the current time or date in an open worksheet, we can use F9 + Shift key to recalculate.
In this we are just using =NOW() function.

Fig8 – NOW() function

After writing the =NOW() function, we need to just press Enter key, Excel will automatically fetch the current date and time of the system.

It will automatically fetch the current date and time of the system.

Fig9 – NOW() function output



A

News
Improve
Discuss
Do you want to advertise with us?Click here to know more

R

File Formats in MS Excel

Microsoft created and released the spreadsheet program known as Excel. It comes from the Microsoft Office family of productivity programs. Excel groups data into columns and rows as opposed to a word processor like Microsoft Word. A cell is a location where rows and columns cross. Data, such as text, a number, or a formula, are contained in each cell. They might not be able to display every feature of a file, programs that are compatible with a file format can present an overview of a file. When we want to save our files, we will have numerous file formats including Excel workbooks, templates, etc. These file formats are divided into various types, including Excel, Word, and PowerPoint presentations. File formats in Excel are of various types, but to determine how many formats exist in Excel, we must follow the procedure outlined below: Step 1: Click on the file option at the top of the ribbon. Step 2: Select the Save As option. The Workbook can be saved on local devices (like a computer) and the internet (e.g. OneDrive). Step 3: Click on the option Browse and save as the dialog box opens. Step 4: Choose the Save As option and you will see a list of file formats. Depending
Read More

How to Calculate End Date from Start Date and Duration in Excel?

Excel is a powerful data visualization and analysis software, which uses spreadsheets for managing, storing, and visualizing a large amount of data. A cell, a rectangular block is used to store each unit of data. This tool can be used to visualize trends or compare data by creating graphs, or get insights from the data using functions and formulas. It is primarily used for accounting purposes but can be used by anyone for many different tasks as per the requirements. Let's see how to calculate the end date from the start date and duration. Calculate the end date from the start date and duration (weeks) To calculate the end date from the start date and the number of weeks(duration), use the below formula: =IF(start_date, start_date+(duration_in_weeks*7),"") This formula will add (week * 7) days to the start date, as a week has 7 days. For purpose of demonstration use the below data to calculate the end date: Step 1: Apply the formula, Step 2: Drag the fill handle over to the data range. Step 3: To change the value into date format, click the Home tab, and choose Short Date from the General drop-down list. Output Calculate the end date from the start date and duration (mont
Read More

VBA Date and Time Functions in Excel

article_img
Date and Time Functions are the inbuilt functions that give us the opportunity to see the date or time according to the user's need. Suppose a user needs to see the month or the day or the year then it can be easily seen by different date functions. Similarly, for the time function, also we can manipulate it according to the need of the user. Date and Time functions are used to interconvert date and time in different formats. In this article, we will learn about the most commonly used date and time functions. VBA Date Functions There are fifteen-plus different date functions in VBA, but here we will talk about some of the most commonly used date functions. VBA Date Function The Date() function returns the current date. The Date() function does not require any arguments. For example, declare a variable name date_1 of Date data type, call the Date() function, and store the return value in date_1, then print the date_1 in the console. Syntax of the function: Date() VBA DateAdd Function The DateAdd() function is used to add an interval of date/time to the respective date or time. The function will return the resulting date or time. The function takes three arguments, Interval, Nu
Read More

I

WhatsApp Introduces Text Formatting Shortcuts: Four New Text Formats Introduced

article_img
Gone are the days of plain text messages on WhatsApp. With the introduction of four new text formatting options, you can now add structure, clarity, and even a touch of personality to your messages. This article digs into these new features, describing what they are, how to use them, and the advantages they provide for your communication.In ShortWhatsApp now offers bulleted lists, numbered lists, block quotes, and inline code for text formatting.These features are easy to use with specific shortcuts and automatically applied by WhatsApp.The new formatting options are compatible across various devices and platforms.New Text Formatting Options on WhatsAppWhatsApp, the Meta-owned instant messaging platform, has introduced four new text formatting options for its users12. These additions include shortcuts for creating bulleted and numbered lists, block quotes, and inline code1. These formatting options are meant to offer users more ways to express themselves and organize their messages.What Are The New WhatsApp Text Formatting Options?WhatsApp has introduced four new text formatting options:Bulleted lists: Create clear and concise lists by starting each line with a hyphen (-) followed
Read More

A

7 Best ChatGPT Plugins for Converting PDF to Editable Formats

article_img
In the digital world where files have been converted into heavy storage files, PDFs have become one of the most known formats of storing files. But many of us face this situation wherein while going through a PDF file, we find some problems in it and want to remove or change some of its texts. Here comes a big drawback of the PDF version of file storage. Though we can highlight or add side texts in the file we cannot remove or modify anything from it. Now we know the problem but what could be the solution? Do we have to go through those lengthy processes of copying the texts from the PDF and then pasting it into our Word file? But why increase our burden, when we have ChatGPT plugins for converting PDF to editable formats of files? 7 Best ChatGPT Plugins for Converting PDF to Editable Formats 1. Code Interpreter2. ChatOCR3. Converter App4. UPDF AI5. Wondershare PDFelement6. PDF Gear7. DocsumoHow to Convert PDF to Editable PDF with ChatGPT Plugins?7 Best ChatGPT Plugins for PDF ConversionHere are the listed 7 best ChatGPT Plugins to be used for the purpose of PDF conversion, along with their features, pricing, etc. 1. Code Interpreter Code Interpreter is an official plugin developed
Read More

How to Combine Text with Date or Time in Excel?

article_img
Microsoft Excel allows its users to store and manage different varieties of data in the form of rows and columns and store it inside an Excel workbook. Since Microsoft Excel allows its users to not only store data but also manipulate that data later on as per their needs. Combine Text with Date or Time in Excel Let's assume a scenario where a user is having data in two different columns. In the first column, the user has some text and in the second column, the user has either date or time values and the user wants to manipulate this data in such a way that he/she can combine the data of both of these columns in a third column. Text Date Final Form MS Dhoni was born on07/07/1981MS Dhoni was born on 07/07/1981Virat Kohli was born on 05/11/1988Virat Kohli was born on 05/11/1988 Now, we can observe that our goal is to append data of one column with data of another column. Microsoft Excel provides us with two useful ways using which we can combine these two elements. The first one is the Ampersand (&) symbol/operator and the second one is the CONCAT() function. Method 1: Combining text with date/time using Ampersand (&) operator We can use the & operator to combine two elem
Read More

How to Remove Time from Date/Timestamp in Excel?

article_img
Timestamp stores a combined Date and Time value. In this article, we will look at how we can create Timestamp and remove Time from Date in Excel. To do so follow the steps below: Step 1: Formatting data to create a timestamp. Select the cell, right-click on it choose Format Cells... Step 2: Then in the Formal Cells box select Custom in Category and in the type select dd-mm-yyyy hh:mm, and then click Ok. Then, we will enter our date with time in the cell. To remove Time from Date with Format Cells Step 1: Highlight the cells to remove time from date. Step 2: Then right-click on it and choose Format Cells... Step 3:-Then in the Format Cells box select Date in Category and select *14-03-2012 in Type, and then click Ok. After that time is removed from the date. To remove Time from Date with Find And Replace Function Step 1: Highlight the cells to remove time from date. Step 2: Then, click to Home on the Ribbon. In the Editing group, click Find & Select. Step 3: In the resulting menu click Replace... Step 4: Then in Find and Replace box enter the space bar and * in Find what box and leave a blank in Replace with box, then click Replace All. After that time is removed from the date.
Read More

Excel Date Functions with Formula Examples

article_img
There are many functions in Microsoft Excel that may be used to work with dates and timings in Excel. Each function completes a straightforward task, but by combining numerous functions into a single formula, you may handle trickier and more complicated problems. The purpose of discussing DATE functions in Excel is to help different people perform more complex and challenging tasks by combining several functions within one formula. The DATE function is used to calculate dates in Excel. To work with these formulas you first need to insert the dates in Excel. Excel provides different functions to work with dates & times such as TODAY, NOW, WEEKDAY, EOMONTH, etc. which we will discuss here with examples. Excel DATE function ListDATE Function Get the Current date and TimeTODAY- It returns today's date.NOW- It returns the current date and time.Converts Dates to / From textDATEVALUE- Helps to Convert date in the text format to date format TEXT- It helps to convert a date to a text value.Retrieve dates in ExcelDAY- It returns the day of the monthMONTH- It is used to return the month of a specified dateYEAR- It is used to return the year of a specified dateEOMONTH- It returns the last
Read More

How to Automatically Insert Date and Timestamp in Excel?

article_img
The Date and Timestamp is a type of data type that determines the date and time of a particular region. It contains some characters along with some encoded data. This format may vary from language to language. Keeping track of date and time helps in managing records of our work as well as segregate the information day-wise. In this article, we will be going to learn how we can automatically insert Date and Timestamp in Excel. There are multiple ways to insert Date and Timestamp in Excel. These methods include both static and dynamic methods. 1. Inserting Date And Timestamp using keyboard shortcuts (Static method) The static method is helpful when there are only a few cells where you need to insert the Date and Timestamp. You can quickly use the keyboard shortcut to manually insert the Date and Timestamp. Follow the below steps to implement the same: Select the cell into which the current date or time needs to be inserted.Use this shortcut - Ctrl + ; (Control + semicolon) to insert the current date.Use this shortcut - Ctrl + Shift + ; (Control + Shift + semicolon) to insert the current time.Use this shortcut - Press the combination (Ctrl + ;) and (Ctrl + Shift + ;) to insert the cur
Read More

How to Sort by Date in Excel?

article_img
Excel provides various types of sorting formats e.g. “sort A to Z”, “Sort Z to A”, “Sort by color” and “Sort by date” etc. Sorting in Excel is nothing but arranging data into some meaningful order to make it easier to understand, analyze, or visualize. Here, we will be discussing how to sort by Date in Excel whether it may be Years, Months, Days, or weeks. How to Sort by Date in Excel? How to Sort by Date in Excel?Chronological or reverse chronological order is the easiest way to sort data by date. This sorts the data in ascending or descending order. In Excel, you must have the dates in one single format to sort the data by date otherwise they do not always work. To sort the dates in chronological order follow the below steps: Step 1:  Select the dates which you want to sort in ascending or descending order. Step 2: Click Home tab -> Click on the arrow under Sort & Filter, and then click Sort Oldest to Newest. As a result, data is sorted from oldest to newest. Step 3:  If you want to sort dates from Newest to Oldest, then Click Home tab -> Click on the arrow under Sort & Filter, and then click Sort Newest to Oldest. As a result, data is sorted by newest to oldest. Ho
Read More
three90RightbarBannerImg