Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Akina0929
Creator
Creator

how to display date field values conditionally?

Hi,

I have one date field,I want to display in that field

if the date field value is lastmonth, it has to display same date

else condition '-'

3 Replies
sushil353
Master II
Master II

Try this:

if(Month(DateField) = Month(Addmonths(today(),-1),DateFiled,null())

Akina0929
Creator
Creator
Author

Hi sushil,

         it,s showing error.Capture.JPG

rahulpawarb
Specialist III
Specialist III

Hello AB,

Month function takes 1 parameter. Corrected the expression to add closing bracket for month function.

//Old Code:

=if(Month(saledate) = Month(AddMonths(Today(),-1), saledate, null())

//New Code:

=if(Month(saledate) = Month(AddMonths(Today(),-1)), saledate, null())

Hope this will be helpful.

Regards!

Rahul