May 08, 2022 07:17 PM
I wanted to assign a delivery timeslot to an order based on the order created time. Example, if a customer places and order after 8pm and before 12midnight, the schedule delivery will be between 8am to 11am the next day. I tried using IS_AFTER and IS_BEFORE in an IF-AND formula but it is showing a blank result. NEED HELP BADLY. Thanks
May 09, 2022 07:23 AM
Hey there Jocille,
I think this could be done with a formula and the ‘created date’ field.
I’m not a pro when it comes to how Airtable handles dates and timezones, so this formula still needs some tweaking to get the hours just right, but I think it could get on the right path. For this to work I created a field called “Order Time”.
Using the nested ‘IF(AND’ statement is what makes this work. Remember to surround the AND conditions with (). So AND(argument 1, argument 2).
IF(AND(DATETIME_FORMAT({Order Time},‘h’)>8,DATETIME_FORMAT({Order Time},‘h’)<11),‘Between 8 and 11’,‘Outside’)
Let me know if that helps!
Paul
May 12, 2022 05:47 PM
Thanks for this! Unfortunately, there has been some changes on the project requirement. :(((
The new task is, generate a random schedule per order, and I just found that there is no RANDOM function in Airtable.
Thanks for the help though, I’ll use this as reference to future projects.