Help

Re: Using Date and Time for Automation

1027 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Fuad_Bajjali
4 - Data Explorer
4 - Data Explorer

Dear Community,

I am new to airtable, and it is working fine for me so far.
I am trying to automate posting to Facebook Page, I have a field in my records that contains Date and Time components.
When adding a condition, I noticed that I can only test the date component, but not the time. Which means I couldn’t so far set an exact time for my post.
Am I doing something wrong?

4 Replies 4

Hi there,

you can do the following:

  1. create a field to extract the time of the field you have already let’s say “day_to_post”
    the formula will be: TIMESTR(day_to_post)
  2. Then create your automation with by setting 2 conditions to run. The first will be on day_to_post field while the second will look at the field with time function.

Please notify us if it works for you and if you need further support don’t hesitate to text us.

Fuad_Bajjali
4 - Data Explorer
4 - Data Explorer

Thank you for your reply. I tried the following solution:

In my table I have the following 2 fields:

Post_Date: I set here the date and time when I want my record to be posted on FB page.

Post_Time_Diff: is a formula field implementing the following formula

DATETIME_DIFF(NOW(),{Post_Date},‘minutes’)

The condition I am trying to use in the automation is like this:

When Post_Time_Diff >= 0

So, if the Post_Date is after or equal to now(), the post should be created.

I have 2 records in my table, and the post_time_diff field for them shows 170 and 50 minutes respectively. Yet, nothing was posted so far in my FB Page.

Am I doing something wrong? Where is the hiccup?

Hi Fuad,

please keep in mind the following:

  • the time diff returns negative number when the “date post” is in the future, while it returns positive number when it is in past.
    So your automation should run when diff is = 0
  • The now function runs when you open the table, so if you open it at 7:29 pm and the automation should run at actually at 7:30pm (when the date_diff should be equal to zero) at 7:30pm you had already opened the table, so it will keep in cache memory the value of 7:29pm

To solve this issue I recommend you to do the following:

  1. Create field “post time” which should be duration type. There you will put the time you want all posts be scheduled by using the 24hr system
  2. Create an automation that matches conditions:
  • Post_date is “number of days from now= 0
    AND
  • post_time is equal to the time you want to run the post. This time should be the exact time you put in the post_time field

Following this solution means that all your post will run at the same time but this is the most efficient I can recommend you in free plan.

Otherwise you can use the scripting to create this automation but after March 22 the scripting will bb available only in pro plan. Do you use a paid version of Airtable?

Thanks.

How would you approach this with a script?

I’m surprised that automations don’t account for the timestamp. Facing a similar issue myself.