Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:05,200 --> 00:00:12,130
In this lesson, we're going to blast through some of the most useful date and time functions in Excel.
2
00:00:12,910 --> 00:00:18,070
And we're pretty much going to cover most of the date and time functions that you're going to come across.
3
00:00:18,400 --> 00:00:25,660
So on this worksheet, we have a column column A. that contains a date and this date is currently in
4
00:00:25,660 --> 00:00:29,320
short date format and we then have an invoice total.
5
00:00:30,040 --> 00:00:37,780
And what I want to do is I want to extract certain parts of this date into separate columns, and we're
6
00:00:37,780 --> 00:00:41,110
going to do this using date functions.
7
00:00:41,380 --> 00:00:46,450
Now the majority of these that I'm going to show you rely on the fact that we have the full date in
8
00:00:46,450 --> 00:00:51,670
Column A because we're going to use this column as our reference point to extract the various different
9
00:00:51,670 --> 00:00:52,810
parts of this date.
10
00:00:53,080 --> 00:00:58,630
So effectively, we're breaking up this date into its different parts, and I'm going to show you a
11
00:00:58,630 --> 00:01:01,960
function in a moment the kind of does the opposite.
12
00:01:01,990 --> 00:01:06,610
So if you have things like the day number, the month number and the year, how you can combine them
13
00:01:06,610 --> 00:01:09,800
all together into a short date format.
14
00:01:10,480 --> 00:01:12,410
But let's not get too far ahead of ourselves.
15
00:01:12,430 --> 00:01:15,280
Let's run through all of these different functions.
16
00:01:15,670 --> 00:01:22,380
So in Column C, we want to extract the day number from the date and column A..
17
00:01:23,290 --> 00:01:25,600
So we have a function called day.
18
00:01:26,470 --> 00:01:30,940
Now notice there is only one argument for this and that is serial number.
19
00:01:31,120 --> 00:01:37,270
And this is slightly misleading because what excel means by a serial number is just the cell that contains
20
00:01:37,270 --> 00:01:37,720
the date.
21
00:01:37,960 --> 00:01:46,960
So in this case, A4 close the bracket, enter, it's extracting the day part of this date.
22
00:01:46,990 --> 00:01:54,010
So in this case, 10, I can then double click, which is going to copy that formula down and extract
23
00:01:54,010 --> 00:01:55,660
the days for the rest of the date.
24
00:01:55,990 --> 00:01:57,430
Super easy.
25
00:01:57,760 --> 00:02:01,990
Now what if I want to extract the day name from this date?
26
00:02:02,410 --> 00:02:08,560
And what I mean by the day name is Monday, Tuesday, Wednesday, Thursday, so on and so forth.
27
00:02:09,340 --> 00:02:14,440
Now this works in a slightly different way, because if the answer that you want to extract from a date
28
00:02:14,440 --> 00:02:22,480
is a text based answer such as the day name or maybe the month name, you need to use the text formula.
29
00:02:22,780 --> 00:02:26,860
This function has two arguments value and then format text.
30
00:02:27,520 --> 00:02:31,390
Now the value again, is just the cell that we want to extract from.
31
00:02:32,380 --> 00:02:35,470
And then we need to provide the format for this day.
32
00:02:35,980 --> 00:02:40,240
So this is where those moms and dads come in again.
33
00:02:40,930 --> 00:02:47,350
So if we're extracting the day, we want to use the D, but how many days we use will determine if I
34
00:02:47,350 --> 00:02:55,000
get money mo and all Monday, and this needs to go in quote marks because it is essentially text.
35
00:02:55,810 --> 00:03:02,110
And if I type in three days, first of all, close my quotes and hit enter, I'm going to get the short
36
00:03:02,110 --> 00:03:04,450
version of the day name.
37
00:03:05,140 --> 00:03:06,310
It's double click to edit.
38
00:03:06,700 --> 00:03:13,840
If I was to add another day in here and her answer, I get the long day name and then I can double click
39
00:03:13,990 --> 00:03:15,340
to copy that down.
40
00:03:16,030 --> 00:03:21,250
So just remember that when you're trying to extract things from dates, if it's text, you need to use
41
00:03:21,250 --> 00:03:22,480
the text function.
42
00:03:23,620 --> 00:03:28,510
Let's move across to the next column because this time we want to extract the month number.
43
00:03:29,140 --> 00:03:32,630
And for this, we use the month function.
44
00:03:33,040 --> 00:03:36,790
Again, one argument, which is the serial number eight.
45
00:03:37,840 --> 00:03:38,740
Close the bracket.
46
00:03:38,920 --> 00:03:42,850
Enter and we get the month number parts of this date.
47
00:03:43,120 --> 00:03:47,110
Now, once again, the next thing that we are extracting is the month name.
48
00:03:47,530 --> 00:03:52,390
So this is going to be January, February, March, and this is text.
49
00:03:52,810 --> 00:03:55,870
So we need to use the text function again.
50
00:03:56,770 --> 00:04:03,220
Let's select our value, which is A4, and then we can choose our format, which needs to go in quote
51
00:04:03,220 --> 00:04:03,640
marks.
52
00:04:04,420 --> 00:04:06,010
So this time within with the month.
53
00:04:06,010 --> 00:04:07,720
So we want MS in here.
54
00:04:08,290 --> 00:04:11,890
If I do three MS, I'm going to get the short version of the month.
55
00:04:11,890 --> 00:04:18,490
So Jan fed Ma, if I put forums, I'm going to get the long version of the month.
56
00:04:19,240 --> 00:04:20,320
Let's say enter.
57
00:04:20,380 --> 00:04:24,370
And then, of course, I can double click to copy that down.
58
00:04:25,060 --> 00:04:26,380
Really straightforward.
59
00:04:26,590 --> 00:04:28,060
The next one is super easy.
60
00:04:28,060 --> 00:04:31,660
We're extracting the year and we have a year function.
61
00:04:32,140 --> 00:04:34,030
You guessed it serial number.
62
00:04:34,360 --> 00:04:39,700
Close the bracket, hit enter and it's going to extract the year parts of that date.
63
00:04:40,030 --> 00:04:48,340
And then finally, I can extract the week day number and we can do that using the week day function.
64
00:04:48,520 --> 00:04:52,210
Now, the first argument here is the serial number, so we need the date again.
65
00:04:52,750 --> 00:04:56,740
And now we can specify how we number our weekdays.
66
00:04:57,040 --> 00:04:58,630
Now I tend to number mine.
67
00:04:58,630 --> 00:05:02,980
As in Monday is one all the way through to Sunday being seven.
68
00:05:03,490 --> 00:05:04,620
But some people in different.
69
00:05:04,780 --> 00:05:09,610
That's the world number there weekdays differently, some people might start their week on a Sunday,
70
00:05:09,610 --> 00:05:11,410
and so that is number one to them.
71
00:05:11,770 --> 00:05:15,160
Some people might start on a Thursday, so on and so forth.
72
00:05:15,760 --> 00:05:19,240
And this is the argument where you can specify exactly that.
73
00:05:19,480 --> 00:05:22,230
So if I choose to put a two in here is this argument.
74
00:05:22,240 --> 00:05:25,810
It's going to number Monday as one through to Sunday seven.
75
00:05:26,350 --> 00:05:31,710
And that is exactly what I want to close the bracket into.
76
00:05:31,870 --> 00:05:35,400
And now I get the weekday number double click.
77
00:05:36,040 --> 00:05:39,070
So if I just take a quick look at this, this first one is full.
78
00:05:39,070 --> 00:05:43,300
And yes, Thursday, according to me, is day number four.
79
00:05:43,600 --> 00:05:49,180
And if I wanted to get super fancy and this will even give us a chance to practice a quick if statement,
80
00:05:49,690 --> 00:05:56,620
I could type in an if statement here, which tells me if this date effectively in Column A is a weekend
81
00:05:56,980 --> 00:05:57,940
or a weekday.
82
00:05:58,660 --> 00:06:03,220
So what I could say here is equally if my logical test.
83
00:06:03,880 --> 00:06:15,760
Well, what I can say is if the weekday is greater than five, if that is true, then yes, it's the
84
00:06:15,760 --> 00:06:16,420
weekend.
85
00:06:17,020 --> 00:06:18,670
If it's not, then.
86
00:06:18,860 --> 00:06:25,930
No, it isn't, because Saturday and Sunday are effectively numbered six and seven.
87
00:06:26,740 --> 00:06:33,370
So if I hear Enza and then copy this down, I should find that most of these are no except when we get
88
00:06:33,370 --> 00:06:39,850
to anything that is a six or seven, which will be yes, because these represent Saturday and Sunday,
89
00:06:40,540 --> 00:06:43,300
so some really useful functions in there.
90
00:06:43,600 --> 00:06:50,440
Now I mentioned earlier that we can in fact do the reverse of that and combine values together to create
91
00:06:50,440 --> 00:06:50,920
a date.
92
00:06:51,790 --> 00:06:57,040
So if we take a look at this table at the top here, you can see I have the year in one column, the
93
00:06:57,040 --> 00:07:00,010
month in another column and the day in another column.
94
00:07:00,820 --> 00:07:06,610
So what I can do here is use the date function and all I need to do is specify the cells.
95
00:07:06,610 --> 00:07:15,160
So the year is OK for the month is full and the day is M4 closed.
96
00:07:15,160 --> 00:07:20,770
The bracket enter and I get that date, which I can double click and copy down.
97
00:07:20,950 --> 00:07:26,350
I could do exactly the same for time, so equals time.
98
00:07:27,420 --> 00:07:35,160
We need to specify the hour, the minutes and the seconds close bracket enter.
99
00:07:36,360 --> 00:07:40,440
And there I get my time's super useful functions.
100
00:07:40,830 --> 00:07:45,330
Now let's jump across to the Time Functions worksheet because I just want to finish off by showing you
101
00:07:45,690 --> 00:07:50,970
how we can do pretty much exactly the same, but this time using time as a serial number.
102
00:07:51,660 --> 00:07:58,080
So I have some times in this first column and we can break those down using more functions in Excel.
103
00:07:59,010 --> 00:08:01,260
So the first one is the our function.
104
00:08:01,560 --> 00:08:07,920
Again, it just requires a serial number and it's going to pull out of that the our double click to
105
00:08:07,920 --> 00:08:08,580
copy down.
106
00:08:09,450 --> 00:08:14,430
We have a minutes function again.
107
00:08:14,490 --> 00:08:15,930
Serial number is required.
108
00:08:17,640 --> 00:08:20,130
And we can double click to copy that down.
109
00:08:20,370 --> 00:08:28,200
And then finally, we can add the seconds by using the second function serial number.
110
00:08:28,380 --> 00:08:33,390
Close the bracket, hit enter and then we can double click to copy that down.
111
00:08:34,140 --> 00:08:37,980
Now, because of the way that I have these times, these last two are just showing zeros.
112
00:08:38,340 --> 00:08:39,750
And that is actually correct.
113
00:08:40,140 --> 00:08:43,440
It's really only this first column that has different values in it.
11438
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.