Time subtraction in unix format for countdown timer

Hi I’m new here! So I am aiming to create a ‘countdown timer’ in a 4-hour interval and display the result in HH:MM format e.g. (Countdown in 01:32). I have two time blocks, get current time and get specific time (set to 16:00hrs as a test), followed by a math block to do the subtraction between the two times in unix format. Finally, I parsed it back to normal time format and show it on an interaction block but it keeps displaying the result as ‘0’.

Can anybody guide me to achieve the this?

  • every minute trigger
  • get current unix
  • get row (with the unix where its supposed to start)
  • if current unix is higher than stored unix
    • run action
    • update row with next time or delete row whatever so it doesnt start the next minute again lol

if you want to get in how many seconds its supposed to start, then use an math block (future unix minus current unix)

to display the time, use discord timestamps

(btw unix timestamps are just how many seconds passed since january 1st, 1970)

This topic was automatically closed after 44 hours. New replies are no longer allowed.