prudens Posted March 2, 2008 Share Posted March 2, 2008 Hey, so i have this $date = 01012008, how do I echo it in the format of 01-01-2008? Thanks Quote Link to comment Share on other sites More sharing options...
plodos Posted March 2, 2008 Share Posted March 2, 2008 try this, but also it depends on your server time!!! $now = time(); $date = date("d/m/Y H:i:s",$now); Quote Link to comment Share on other sites More sharing options...
AndyB Posted March 2, 2008 Share Posted March 2, 2008 @ plodos: what's the connection between your reply and the original question. @ prudens: avoid imaginary date strings like the plague. Use a rational date format (the ISO yyyy-mm-dd is ideal) and format the date to your liking before displaying it. Quote Link to comment Share on other sites More sharing options...
prudens Posted March 2, 2008 Author Share Posted March 2, 2008 Well, any way to format it? I wish to save that extra 2 byte space... I only have 10mb of SQL space... I'm already using 9.5mb. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.