May 25, 2020 03:10 PM
It would appear that the ‘Date’ field does not record seconds.
Here’s why I think this:
Here are the formulas I’m using to expose this:
DATETIME_FORMAT({Date (no secs?)}, ‘DD-MM-YYYY h:mm:ss’)
DATETIME_FORMAT({Created Time}, ‘DD-MM-YYYY h:mm:ss’)
I hope I’m wrong about this. I need to be able to grab seconds from a ‘Date’ record.
Solved! Go to Solution.
May 25, 2020 04:37 PM
You are correct, that clicking “today” in the date/time picker only enters year, month, day, hour, and minutes. Seconds are set to zero.
I used that exact same method when entering the date/times in my screen capture. Then I used a formula field to show how Airtable stores the date/time value internally in ISO 8601 format. You can see the trailing zeros for zero seconds in the screen capture.
I’m afraid that clicking “today” will not work for your use case.
May 25, 2020 03:23 PM
Wow, that’s very interesting.
Looks like “seconds” are supported in the “Created Time” field and “Last Modified Time” field, but not in a normal “Date” field.
Looks like you’ll need to use the “Duration” field, which supports hours, minutes, and seconds.
It also seems like it would make sense for Airtable to open up the normal “Date” field for seconds as well. You may want to add this as a feature request in the Product Suggestions topic.
p.s. If this answers your question, could you please mark this comment as the solution to your question? This will help other people who have a similar question. :slightly_smiling_face:
May 25, 2020 03:48 PM
Date/time field do store seconds, and even fractions of seconds. However, there is no way to enter seconds in a date/time field through the user interface. Thus, whatever date/time you enter, there are no seconds, yet the "created time"field does have seconds.
This shows how date/times store seconds to three decimal places.
You can get the seconds from a date/time field using the SECOND()
function in a formula field. It will be an integer from 0-59.
However, it seems the only way to enter a date/time with seconds is through one of the APIs, or to grab it from a {created time} or {modified time} field/function.
If this answers your problem, please mark this post as the solution. Otherwise, could you please give a bit more details on where your date/time comes from?
May 25, 2020 04:05 PM
Thank you. My date/time comes from clicking into my first column (Date), and then clicking “Today” from the calendar.
It sounds like doing that only enters year, month, day, hour, and minutes?
How did you get your seconds to show? I’m guessing from what you said your ‘date/time’ column comes from an API?
Here’s what I’m trying to accomplish ultimately: Elapsed time / stop watch / timer
May 25, 2020 04:13 PM
Thanks @ScottWorld: I added this to Product Suggestions, per your suggestion: Support seconds in Date field
May 25, 2020 04:22 PM
May 25, 2020 04:37 PM
You are correct, that clicking “today” in the date/time picker only enters year, month, day, hour, and minutes. Seconds are set to zero.
I used that exact same method when entering the date/times in my screen capture. Then I used a formula field to show how Airtable stores the date/time value internally in ISO 8601 format. You can see the trailing zeros for zero seconds in the screen capture.
I’m afraid that clicking “today” will not work for your use case.
May 25, 2020 04:54 PM
Right, what @kuovonne was saying is that you can use the SECOND function to pull the seconds out of a “creation date” field or a “last modified date” field (and you can do this, but you can’t pull any seconds out of a normal “date” field because Airtable sets it to zero.
However — it sounds like if you set the date field through the API, then you CAN set the seconds to the “date” field via the API. That’s a cool trick to know about — I’ve never tried that before!