You are on page 1of 5

WORKING WITH DATES AND

TIMES
It is very important to understand how Excel stores dates
and times when dealing with them.
In this course, we will Learn the best ways to enter dates and times including
some shortcuts.
Learn how to quickly build date-time series.
Learn how to apply date-time formatting instantly.
Learn how to create our own custom date-time formats
when necessary for optimum readability.
See powerful date and time functions.
Learn shortcuts and tips to optimize tricky time
calculations and the best techniques for converting dates
downloaded from other sources.
How to use dates in data validation rules as well as in
filtering.
When you type a date entry, it automatically appears in the
right hand side of the cell.
In Excel, all numbers (values) appear in the right hand
side of the cells while all text appears in the left hand side
of the cell.
In Excel, the entire date system starts on 1st January 1900.
Every date has a number (value) associated with it. So
1st January 1900 corresponds to the value 1.
To check the value associated with any date, click the ,
(Comma) button in the Numbers group on the Ribbon Tab.
This date system works until the year 10,000. All leap years,
monthly and yearly boundaries are taken into account.

An indication that you have typed in an impossible date is


that the date would appear in the left hand side of the cell.
Excel doesnt recognize it as a date. It just more or less
assumes it to be a string of characters.
In the world of Apple, the date system starts on 1st January
1904. So when we download files that may have been
generated on an Apple computer onto a Windows computer,
we might need to change the date system (not always). To do
so, we need to change the settings in the Options as follows
Options> Advanced> Check the Use 1904 date system.
Excel has, since its earliest versions, incorrectly considered
1900 to be a leap year, and therefore that February 29, 1900
comes between February 28 and March 1 of that year. This is
called the leap year bug since February 29, 1900 doesnt
exist and is a problem for both digital (computer-related) and
non-digital documentation and data storage situations which
results from the wrong calculation of which years are leap
years.
In Excel, times are stored as values corresponding to
portions of the 24 hours day. Hence the values are
fractional or decimal values from 0/24 to 24/24. So 6:00 am
would correspond to a value of 6/24 or 0.25.
To enter the current date into a cell, press Ctrl + ;. To
enter the current time into a cell, press Ctrl + Shift + ;.
The date and time entered through this method would not
change unless the content is actually changed i.e. they are
not dynamic but are instead static entries.
To have dynamic date and time entries, we need to make
use of the TODAY and NOW functions respectively. These
entries change every time any change is made to the
workbook or the workbook is refreshed.

The NOW function returns both the date as well as the


time which can be formatted to display only time.
To refresh the workbook, press F9.
We can use Autofill to fill in the names of the months and
days of the week. It works for both complete names as well
as 3 letter abbreviated names of the months and days of
the week.
Autofill also helps in filling in the consecutive dates and times
having a common difference.
While using the Autofill option, we can use the right click
option menu which lets us
Fill days.
Fill months.
Fill years.
Fill weekdays.
While using Autofill, pressing the Ctrl key and dragging
ensures that the content in all the cells being dragged through
remains the same.
To change the format of date entry from 2-3-16 format to 2Mar-16 format, press Ctrl + Shift + #. This helps in removing
any misunderstanding of the date.
To change the time format from 24 hours to 12 hours, press
Ctrl + Shift + @.
When we try to add duration in hours, if the total sum exceeds
24 hours, then only the hours exceeding 24 get displayed. For
example, if the sum of duration in hours is 27 hours 38
minutes, then only 3 hours 38 minutes get displayed in the
sum. To correct the error, we need to change the format of
the duration in the sum to [h]:mm format from the
default h:mm:ss format.

To determine the day of the week given the date, we can use
the WEEKDAY function. The function returns a value between
1 and 7 included with 1 corresponding to Sunday and 7
corresponding to Saturday. The value returned can then be
formatted to display the name of the day.
To determine the number of working days (Mon to Fri) between
two dates, we can use the NETWORKDAYS function. This
function also allows us to include any holidays present
between the 2 dates to account for the correct number of
working days. For this we need the list of holidays to put in the
function argument.
If we have the start date of a project and the project length,
then we can determine the end date of the project by using
the WORKDAY function which calculates the end date based
on the working days and also has the provision to add holidays
in the project duration.
In order to subtract or add a time duration to a given time we
need to put the duration in (quotes) after the + or
symbol. For example, if we want to add 45 minutes to 2:00 pm,
then we type = the cell containing 2:00 pm + 0:45: . Then
we get the answer 2:45 pm.
When we calculate the time difference across days, then
we get the result in terms of fractions of a day (could be less
than or greater than 1). We need to format it to get it in hours.
But if the time difference is greater than 24 hours, then we
need to format it again into the [h]:mm format.
To round time calculations to convenient intervals or the
nearest multiples, we can use the MROUND function. The
CEILING function can be used when we want to round the
calculation to the nearest higher multiple. The FLOOR function
can be used when we want to round the calculation to the
nearest lower multiple.

We face problem when we are dealing with a worksheet


containing both time data as well as currency data. For
example, if we have the Time worked and Rate/hour, then
multiplying both the columns to get the wage of the worker
would not yield the correct answer. This happens because time
is stored as a portion of the day. So we need to multiply the
obtained result with 24.
Date filters give great freedom in choosing the range within
which we want to view the data.

Data validation helps in ensuring that the user cant enter a


project date not in compliance with the project schedule. We
can use functions including date functions within the data
validation rules.

You might also like