How do I display the current  ' date '  on a page

How do I display the current ' date ' on a page

How do I display the current ' date ' on a page
divider

Dreamweaver and InterAkt has it’s own bits of scripts integrated to take care of the Date and Time rendering. However there will be some instances where you want to “custom” format your dates or time.

Below are a couple of examples for PHP

<?php echo date("Y-m-d H:i"); //will display 2009-09-27 14:35 ?>
<?php echo date("Y-m-d");  //will display 2009-09-27 ?>
<?php echo date("H:i"); //will display 14:35 ?>

Where:

  • Y = Year
  • m = Month
  • d = date
  • H = hours (24 hour clock)
  • i = minutes

This same code can be used to add the date/time to the database when the Interakt Dynamic data is not available.

Written by:  - 28 Sep, 2009