If Then Else with two or more criteria!

Within means on that date (without time). It’s like an equal instead of a range.

Do any of your dates have an underlying time that is not midnight? Can you show what you have for values for your order date, start date and end date?

OrderDate (Date & Time / medium): 2021-09-19T11:12:35.978Z

StartDate (date only / short): 2021-09-18T00:00:00.000Z
EndDate (date only / short): 2021-09-20T00:00:00.000Z

Test separating the conditions, then join them in a template column and validate based on that column.

If Validate = truetrue Then True Else False

So it returns 0 for your original setup?

Looking at your IF column closer, are you sure you aren’t checking against Start date twice instead of start and end date?

image

Also, I’m not sure off the top of my head, but if ‘is before’ and ‘is after’ includes the time, then you might run into an issue if your order date happens to fall on the end date. So if you order date was on Sept 20th instead of the 19th, the 11:12 time is technically after midnight of the end time, which is Sept 20th. In a case like that, you may want to have a math column to add 1 day to your end date, so you end up with midnight of the next day, so your order date/time would still fall within range.

1 Like

Did you copy/paste those timestamps from the Glide Data Editor, or your Google Spreadsheet?
If from the builder, try editing those columns and reset the date format.
Experience has taught me that any time you see ISO formatted date/time strings in the GDE, it means that the date/time columns aren’t correctly configured. This usually happens when you’ve created the column in the Google Spreadsheet, filled it with dates, and allowed it to sync with Glide and then not set the formatting in the associated Glide columns.

Hola,

Do you want this right?:

StartDate < OrderDate < EndDate

If so, you will need to create 2 (two) ITE columns to get it:

The first one looks like:

image

The other one looks:

image

Of course, you will have to change my " true" setting and use your “QTY” column instead.

I hope it helps!

Feliz noche.

hey man, no need for two columns. I do this all the time…

  • If OrderDate is before Start Date, then empty
  • If OrderDate is after End Date, then empty
  • Else true
2 Likes

let me see! I tested it days ago and never worked for me :lying_face:

I will be back soon Darren

1 Like

WTF??? It’s working :joy:

I don’t know what happened to me those nights but I’m happy to know today that I was wrong.

Thanks a lot for this new notice!

Gracias Darren :+1:

2 Likes