Rate this article

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

Rating: 0.0/5 (0 votes cast)

<?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.

Adobe

Free PositiveSSL and WhoisGuard with Every Domain Purchase
ionCube Online PHP Encoder
XMS Systems

Although we try to ensure all the articles submitted are valid it is your responsibility to make sure you have backups before you use these suggestions on your pc or websites.
We do not take any responsibility for any data-loss, loss in functionality or any problem that might arise in what-ever way or form by making use of the information on this site.

"Friends of Interakt" has no connection to the Adobe Interakt Company