This example illustrates how to create a timestamp type column.
In this example the PHP date() function formats a timestamp to a more readable date and time. A timestamp is the number of seconds since January 1, 1970 at 00:00:00 GMT. This is also known as the Unix Timestamp.
The first parameter in the date() function specifies how to format the date/time. It uses letters to represent date and time formats. Here are some of the letters that can be used:
The second parameter in the date() function specifies a timestamp. This parameter is optional. If you do not supply a timestamp, the current time will be used. In the mktime() function we create a timestamp for tomorrow. The mktime() function returns the Unix timestamp for a specified date.
Source Code of timestamp.php
<?php
|
Output:

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.