Jump to content

[SOLVED] Help me converting unixtimestamp with time() please!


samoi

Recommended Posts

Hello guys!

I have a table that have records of time in unixtimestamp format which is yyyy-mm-dd hh:mm:ss

I need to do some calculations by subtracting the time remaining from the current time until the record unixtimestamp()! or vise versa!

I need the converting format! how to convert unixtimestamp to time() format!

so I can easily do some code like this:

$current = time();
$record = "select DueTime from table where ...etc";
$subtract = $record - $current;

echo 'Your a bonus time remaining of '. $subtract;

 

Help me please

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.