Can someone tell me how I can get a date/time in the following format...
YYYYMMDDHHMMSSss
I have looked at the date/time functions but I am not understanding them enough to get this format.
Thanks.
date("YmdHis");
comes close
$date = date("Ymdhisa");
im assuming the last lowercase "ss" means am/pm
$mili = (int)substr((microtime() * 100), 0, 2); $date = date("YmdHis").$mili; echo $date;
I assumed miliseconds...
Originally posted by drew010 $date = date("Ymdhisa"); im assuming the last lowercase "ss" means am/pm
Thanks. I need the ms at then end too thought. And don't really need the am/pm.
Originally posted by LordShryku $mili = (int)substr((microtime() * 100), 0, 2); $date = date("YmdHis").$mili; echo $date; I assumed miliseconds... [/B]
Originally posted by LordShryku
I assumed miliseconds... [/B]
Perfect! Thanks a ton.