ASPit - Totally ASP
Search PHPit

Use this textbox to search all the content on PHPit. Seperate keywords with a space.


Get current datestamp

With this function you can easily retrieve the current date stamp. Very useful for comparing it with data from a MySQL database.

function get_current_datestamp(){
//get the current timestamp
$currdate = gmdate("Ymd");
$currday = substr($currdate,6,2);
$currmonth = substr($currdate,4,2);
$curryear = substr($currdate,0,4);
$currdate_stamp = ($curryear . "-" . $currmonth . "-" . $currday);



Written by Dennis Pallett on April 02, 2004