Juan Vaca Posted February 4, 2019 Share Posted February 4, 2019 I wanted to create a column where if there is a blank then I would like to insert the previous month and the current year. Link to comment Share on other sites More sharing options...
Juan Vaca Posted February 4, 2019 Author Share Posted February 4, 2019 there was a mistake in the previous excel field Link to comment Share on other sites More sharing options...
Harshith Reddy Musku Posted February 4, 2019 Share Posted February 4, 2019 Hello, Are you looking for something like this case when [closing date] IS NULL then Date(Year(DateTimeNow()),Month(DateTimeNow()) - 1,Day(DateTimeNow())) Link to comment Share on other sites More sharing options...
Harshith Reddy Musku Posted February 4, 2019 Share Posted February 4, 2019 But if current month is Jan, you might want this (Dec previous year) case when [closed date] IS NULL and Month(DateTimeNow())!=1 then Date(Year(DateTimeNow())-1,Month(DateTimeNow()) - 1,Day(DateTimeNow())) when [closed date] IS NULL and Month(DateTimeNow())>1 then Date(Year(DateTimeNow()),Month(DateTimeNow()) - 1,Day(DateTimeNow())) end Link to comment Share on other sites More sharing options...
Gaia Paolini Posted February 5, 2019 Share Posted February 5, 2019 Hi would this work It subtracts a month from today's date as a whole. If([closing date] is null,DateAdd("mm",-1,DateTimeNow()),[closing date]) Gaia Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now