 Hello, welcome to SS Unitex, so we'll decide. So this is continuation of PySpark tutorial. So this is part three of the time function. So today we are going to see about add months. Then we'll see about date add and at last we'll see about the date subtract. So how we can use these three type of functions in real time. So let's go to browser and we'll try to seem practical. So here let me try to execute this cell for creating the data frame and that should be having total three columns ID, country ID, then the country and then the make here. If we can expand we'll see the data type as make here as date. So let's start with this date. So let me try to scroll down. First let's see about add months. So here we are having this make here. So let me use df dot select and here let me use df dot months. So the first column we are going to select adds months. Next I am going to use the add months. So this will be your first column. Here it will be going to ask the first parameter as your column name by which we want to add the months. So here the column name is nothing but df dot make here. How many months we want to add? Let's try to add three months and let me put the alias name of this that could be add month. Let me put this into another data frame that could be df one and let me use the display of this f1. So we'll see the output of this. This is not the month actually this is the make here. So that's why we are getting this error. Let me try to execute it again. So add months we cannot access directly. We have to import this function first. So for importing the function we can use the pyspark dot sequel dot functions. Then let me try to import all the function and we'll try to execute it. So this time we should be able to see one additional column has been added and the month like here we have specified three months. So it is added three months now. Here is six. Here is nine four plus three. It will be seven nine plus three. It will be 12. Here we have added this into positive like the past two three months we have added. We can also add the negative months. So here let me try to copy this and here let me put comma and go to here and we can also specify like minus three add months here I can use minus three like this. So this will be your column name. Let me try to execute. So it will be going to add a new column but this time it is going to subtract three months on this make here that we can simply see next we can use the date add so date add function is also very straightforward function here we can simply use the date add. So this date add will be going to add the date on your make here. So here let me use the date add let me execute so it will be adding a new column and here it is saying the syntax error because comma is missing here. Let me try to rerun this again. So the new column will be going to have one more day has been added here is 21 here one day we have added as 22 similarly 25 and 7 here we have 24 and 6 so one day simply we have added we can also do this addition into negative. So we can here specify minus one so it will be going to subtract one day on your date add let me try to execute whatever the make here we have it will be going to subtract one day from there. So here is 21 if we are going to specify minus one it is going to have like 20 similarly 24 is converted into 23 6 is converted to 5 so these are the things it is doing next we can also use the date subtract function so date subtract and the date add with negative will be the same thing if we are going to use the date subtract and here we are passing the make here and here we are passing one so it will be going to subtract one day on your make here. So here let me call this as date subtract let me execute this still for checking the output of this so it will be adding a new column and the values will be same for both the columns last that we have seen date add minus one and subtract. So these two will be same if you are going to pass this as minus one so I hope guys you have understood how we can use these three functions thank you so much for watching this video see you in the next video.