Help

Re: Date formula with Timeline Block?

3508 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Robert_Hudman
6 - Interface Innovator
6 - Interface Innovator

Hi All

I am in early stages of learning formula functions, and focusing on date based formulas.

One thing I have noticed is that dates created from formula calculations to not seem to work with the Timeline block.

Has anyone found a way to make this work?
Very important for me and hoping there is a solution.

Thanks, Rob

22 Replies 22

image.png

And there is your problem,right there: you are using DATETIME_FORMAT which, as specified in its description:

Formats a datetime into a specified string.

(emphasis mine). The timeline block needs dates as input data, not date-ish strings.

Hi,

Glad to help.
Regarding your questions:

  1. Yes, I use today as the formula for “today” field.
  2. I think what you are triying to achieve with your date formatting is easy to solve with the formating mini tab you have when you create a formula. In that tab you can eliminate the time option and you have some format options for the dates. (I include screenshot)

image.png

About the full picture, I will try to help you in my spare time to see if I can give you some tip about that. I’m a little bit short of time this week end.

Hope to be helpful.

Rgds

Thanks Martin
I am a construction guy who moved into software a year ago, so there is a steep learning curve!

I’m sorry but I have to say it.

That was my first reply :man_facepalming:

No problem; I know how ist is. What computers and what humans think is a data type like a date ist fundamentally different, so it is easy to mix up both, then get bitten by that. For human readable presentation of the underlying data type in Airtable (as long as it not a string), there is the second tab in the field options popup; explicit conversion to another type should be done only when you are fully aware what you are doing and why it is necessary (numeric formula fields have odd issues with grouping / sorting, for instance, so shadowing them with a string converted version is an ugly but necessary hack).

One last word of caution: be wary of conversions in formulas, not all are explicit (like your DATETIME_FORMAT is); if you compare a non-string field with a string (e.g. if you do IF({my numeric field} = "", A, B), for instance, Airtable will implicitly convert all resulting values into strings (the right way to do this ist to check for non-emptiness with IF({my numeric field}, B, A), in case you are wondering).

Be kind. Nobody imbibed programming paradigms (like type systems) from birth; we all learned that stuff at some point, no harm in doing it here.

I don’t want users to know, I want them to read what we reply and do what we advice.

If they don’t do that (and missuse our time -I felt stupid giving the correct path and being ignored-), I think I can al least, point it.

Oh, and of course is nothing personal with @Robert_Hudman, I spent a lot of time in the forum and I just feel disappointed when someone does not follow the questions, steps, links, etc.

Hey Luiggi
Well that makes a lot more sense…thank you!
Any help you can offer would be awesome.

Hi Elias
I don’t know if I have somehow not followed your instructions(?), but can assure you I worked through them in detail before coming back to ask follow up questions.
Your advice is great appreciated.
Robert