Running PHP on one full column.
Running PHP on one full column.
This is how my current DataTables are set up.
http://i.imgur.com/XNl1xiY.png (I blurred out the irrelevant parts)
As you can see in the last row, those are Unix timestamps. The problem is that these are not easily readable. I was wondering if something like this is possible. I'll use the first timestamp in the image as an example. If I wanted to get this to a human readable date, this is how I'd do it in PHP.
[code]
<?php the_time( 'F jS, Y', '1363736217' ); ?>
[/code]
That would give me the date. Now, is there a way that I could make it so it does that for each and every time stamp in the fourth row? The last row is the only row that contains timestamps. I was thinking there might be a way to do it using 'sDom' possibly? Sorry that I probably seem like a noob, I found out about DataTables literally 40 minutes ago. Thank you.
EDIT: I forgot to mention that all of the data is grabbed via MySQL. So there is no HTML for the contents in each row, the only HTML is for the table headers.
http://i.imgur.com/XNl1xiY.png (I blurred out the irrelevant parts)
As you can see in the last row, those are Unix timestamps. The problem is that these are not easily readable. I was wondering if something like this is possible. I'll use the first timestamp in the image as an example. If I wanted to get this to a human readable date, this is how I'd do it in PHP.
[code]
<?php the_time( 'F jS, Y', '1363736217' ); ?>
[/code]
That would give me the date. Now, is there a way that I could make it so it does that for each and every time stamp in the fourth row? The last row is the only row that contains timestamps. I was thinking there might be a way to do it using 'sDom' possibly? Sorry that I probably seem like a noob, I found out about DataTables literally 40 minutes ago. Thank you.
EDIT: I forgot to mention that all of the data is grabbed via MySQL. So there is no HTML for the contents in each row, the only HTML is for the table headers.
This discussion has been closed.
Replies