# Show seconds in date format

**URL:** <https://forum.seatable.com/t/show-seconds-in-date-format/1967>\
**Category:** User Talk\
**Tags:** date-and-time\
**Created:** [January 13, 2023, 2:37pm UTC](https://forum.seatable.com/t/show-seconds-in-date-format/1967 "2023-01-13T14:37:55Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![dimitrios](https://forum.seatable.com/user_avatar/forum.seatable.com/dimitrios/32/2142_2.png) [@dimitrios](https://forum.seatable.com/u/dimitrios)\
**Post date:** [January 13, 2023, 2:37pm UTC](https://forum.seatable.com/t/show-seconds-in-date-format/1967/1 "2023-01-13T14:37:55Z")

</div>

Hey there, I am struggling to find the option to activate “seconds” on the date format.

f.e. in Airtable it shows me 2023-01-13 15:11 but when I do  
DATETIME\_FORMAT(timestampElementTriggered), “YYYY-MM-DD HH:mm:ss”) it generates me the correct seconds, since I fill the field from API with the ISO format.

Its important for us to find the elapsed time between to timestamps like  
DATETIME\_DIFF(timestampElementTriggered,sessionStartTime,‘seconds’)

However, in Seatable, I can’t find the right option, or formular. Only dateDif({sessionStartTime},{timestampElementTriggered}) will return the seconds. But since the Date field crops the seconds, I end up with 0 seconds for (2023-01-13 15:11:10, 2023-01-13 15:11:49) instead of 39 seconds.

Any idea how to solve this?

Best Dimitrios

---

<div class="post-metadata">

**Author:** ![AkDk7](https://forum.seatable.com/user_avatar/forum.seatable.com/akdk7/32/2186_2.png) [@AkDk7](https://forum.seatable.com/u/AkDk7)\
**Post date:** [January 13, 2023, 2:59pm UTC](https://forum.seatable.com/t/show-seconds-in-date-format/1967/2 "2023-01-13T14:59:34Z")

</div>

Hi @dimitrios.

Yeah, I totally agree with you. Time handling in SeaTable is very improvable!

I tried it right now and I could only get it working by combining formulas.

For example:

 ![grafik](https://forum.seatable.io/uploads/default/original/2X/5/5f8385efd5993b80f123628b9403dd4d96a859b9.png)

- The columns “From Time” and “To Time” are of type duration.
- “From Total” and “To Total” are formulas: {From} + {From Time}
- “Seconds” calculates the difference in seconds, so I have to devide it by 60: dateDif({From Total}, {To Toal}) / 60
- And at the end you can combine it to “Dif plus seconds”: dateDif({From Total},{To Toal}) + {Seconds}

So you can play around with the date values and combine it like you want. But you will always end with several columns.

A function to format a iso datetime value with timezone would be a big benefit to the application. Maybe some day in future they will implement it 🙂

---

<div class="post-metadata">

**Author:** ![AkDk7](https://forum.seatable.com/user_avatar/forum.seatable.com/akdk7/32/2186_2.png) [@AkDk7](https://forum.seatable.com/u/AkDk7)\
**Post date:** [January 13, 2023, 3:01pm UTC](https://forum.seatable.com/t/show-seconds-in-date-format/1967/3 "2023-01-13T15:01:17Z")

</div>

I think it didn’t work with different days, but it will work if it is the same day 😃

 ![grafik](https://forum.seatable.io/uploads/default/original/2X/c/c2656038bf842d82c823f2f5ce7a0e5c21e3d487.png)

---

<div class="post-metadata">

**Author:** ![AkDk7](https://forum.seatable.com/user_avatar/forum.seatable.com/akdk7/32/2186_2.png) [@AkDk7](https://forum.seatable.com/u/AkDk7)\
**Post date:** [January 13, 2023, 3:17pm UTC](https://forum.seatable.com/t/show-seconds-in-date-format/1967/4 "2023-01-13T15:17:32Z")

</div>

I think I got the wrong solution 😃

This should do the trick:

 ![grafik](https://forum.seatable.io/uploads/default/original/2X/5/52b8cb6771c2d12c9fa558c6cb22b2460f8ed90a.png)

- Dif Dates: dateDif({From Date1},{To Date1})
- Dif Durations: {To Time2}-{From Time1}
- Duration Toal: value({Dif Dates}+{Dif Durations}, ‘duration’)

---

<div class="post-metadata">

**Author:** ![dimitrios](https://forum.seatable.com/user_avatar/forum.seatable.com/dimitrios/32/2142_2.png) [@dimitrios](https://forum.seatable.com/u/dimitrios)\
**Post date:** [January 13, 2023, 3:34pm UTC](https://forum.seatable.com/t/show-seconds-in-date-format/1967/5 "2023-01-13T15:34:52Z")

</div>

Thanks for the input!

F.e. the API is pushing it like this “sessionStartTime”: “2022-12-22T12:53:30.000Z”  
And the date field is removing the seconds  
 ![image](https://forum.seatable.io/uploads/default/original/2X/9/96058d0163cf5487bea8301fbc0a235ddd906756.png)

I can’t split it before sending to have the correct Date & Time and then process them by formular.  
And writing an automation to do this on every 10.000+ daily entries is also not possible.

best Dimitrios

---

<div class="post-metadata">

**Author:** ![AkDk7](https://forum.seatable.com/user_avatar/forum.seatable.com/akdk7/32/2186_2.png) [@AkDk7](https://forum.seatable.com/u/AkDk7)\
**Post date:** [January 13, 2023, 3:52pm UTC](https://forum.seatable.com/t/show-seconds-in-date-format/1967/6 "2023-01-13T15:52:08Z")

</div>

Hm, I understand. What about import the datetime value into a string column and then convert it into date and time columns?

![grafik](https://forum.seatable.io/uploads/default/original/2X/b/bdbf075df42b50dd132c84909ee233047b794f4c.png)

For the date column:  
date(left({Time String}, 4), right(left({Time String}, 7), 2), right(left({Time String}, 10), 2))

And for the time column:  
(left(right({Time String}, 13), 2) \* (60 \* 60)) +  
(left(right({Time String}, 10), 2) \* 60) +  
left(right({Time String}, 7), 2)

You have to set the time column data type to duration with seconds.

---

<div class="post-metadata">

**Author:** ![dimitrios](https://forum.seatable.com/user_avatar/forum.seatable.com/dimitrios/32/2142_2.png) [@dimitrios](https://forum.seatable.com/u/dimitrios)\
**Post date:** [January 13, 2023, 4:08pm UTC](https://forum.seatable.com/t/show-seconds-in-date-format/1967/7 "2023-01-13T16:08:40Z")

</div>

did the exact thing also

 ![image](https://forum.seatable.io/uploads/default/original/2X/3/3b15d46aa3f57f04549592be4b89501ff9569e84.png)

your “Time” is a formular generating a string, which is not possible to get the dateDiff from

---

<div class="post-metadata">

**Author:** ![AkDk7](https://forum.seatable.com/user_avatar/forum.seatable.com/akdk7/32/2186_2.png) [@AkDk7](https://forum.seatable.com/u/AkDk7)\
**Post date:** [January 13, 2023, 4:12pm UTC](https://forum.seatable.com/t/show-seconds-in-date-format/1967/8 "2023-01-13T16:12:17Z")

</div>

What formula did you put in Formula 3?

---

<div class="post-metadata">

**Author:** ![dimitrios](https://forum.seatable.com/user_avatar/forum.seatable.com/dimitrios/32/2142_2.png) [@dimitrios](https://forum.seatable.com/u/dimitrios)\
**Post date:** [January 13, 2023, 4:28pm UTC](https://forum.seatable.com/t/show-seconds-in-date-format/1967/9 "2023-01-13T16:28:44Z")

</div>

> [@AkDk7](#):
>
> You have to set the time column data type to duration with seconds.

this was important. was not aware that this is possible.

 ![image](https://forum.seatable.io/uploads/default/original/2X/a/a38bd8739d988f7ab4cf9561d2b2f008d252b539.png)

works now. what an effort for what is one simple formula in Airtable…

thanks for the examples and your help!

---

<div class="post-metadata">

**Author:** ![AkDk7](https://forum.seatable.com/user_avatar/forum.seatable.com/akdk7/32/2186_2.png) [@AkDk7](https://forum.seatable.com/u/AkDk7)\
**Post date:** [January 13, 2023, 4:59pm UTC](https://forum.seatable.com/t/show-seconds-in-date-format/1967/10 "2023-01-13T16:59:43Z")

</div>

It is, unfortunately. But the team around SeaTable is improving the functionallity very well. And have to keep in mind it is still a very young software.

---

<div class="post-metadata">

**Author:** ![system](https://forum.seatable.com/uploads/default/original/1X/04603423fe81a46c321283663086c475429e8ccb.png) [@system](https://forum.seatable.com/u/system)\
**Post date:** [April 13, 2023, 5:00pm UTC](https://forum.seatable.com/t/show-seconds-in-date-format/1967/11 "2023-04-13T17:00:25Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
