Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to obtain date values based on conditions?

I added a custom column to say:

  • If the Status column equals Active or Pending bring the date from the Office Date column.
  • For any other values in the Status column, bring the date from the Incoming Date column.

All the rows with Active or Pending statuses have the correct dates from the Office Date column but everything else with the Incoming Date is showing as errors (from the second point).

Here is the code that I used: if [Status] = "Active" or "Pending" then [OfficeDate] else each [IncomingDate]

Is the part stating else each [IncomingDate] wrong?

like image 978
Lio Djo Avatar asked Dec 18 '25 15:12

Lio Djo


1 Answers

Try this:

if [Status] = "Active" or [Status] = "Pending" then [OfficeDate] else [IncomingDate]
like image 125
davidebacci Avatar answered Dec 24 '25 09:12

davidebacci



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!