Skip to main content
namanr2692
September 24, 2022
Question

Date difference

  • September 24, 2022
  • 1 reply
  • 0 views

How might I get the number of seconds between NOW() and a date in the database? I checked various other resources like this But was not fully satisfied with whether what I was doing is correct or not. Can someone Guide me?

Much appreciated.

1 reply

Participating Frequently
September 24, 2022

1. If you are trying to perform this on the Appian side you can simply subtract the dates and use the second() function to get the dates out of it.

2. If you are using MariaDB try this out

 

SELECT SECOND(TIMEDIFF(CURRENT_TIMESTAMP,'2022-09-24 20:18:50'));