Page 1 of 1
day_month_year__hour_minute_second
Posted: Sun May 30, 2004 4:18 am
by ddragas
Hi all.
First I'm begginer so please don't lough on my problem.
What is function of getting date-time format so at the end, printed variable looks like this: day_month_year__hour_minute_second
Posted: Sun May 30, 2004 4:23 am
by wwwapu
date() is described in manual
Posted: Sun May 30, 2004 4:47 am
by ddragas
thank you
I've found somthing about date
$localtime = mktime();// the current datetime as a timestamp
/* Display it as yyyymmdd */
$ddmmyyyy = date("d_m_Y__h_MIN_SEC", $localtime);
echo $ddmmyyyy;
echo "<br>\n";
And time?
Posted: Sun May 30, 2004 5:29 am
by feyd
"d_m_Y__H_i_s"
Posted: Sun May 30, 2004 6:26 am
by wwwapu
And if you want $ddmmyyyy from current time you don't need $localtime. Personally I find it very difficult to remember all date() options. For this (and for reference in general) I downloaded chm format manual from
http://www.php.net. It's easy to use windows help-file type manual with search and stuff. Highly recommended...