johne281 Posted August 2, 2009 Share Posted August 2, 2009 Hi i input this code: <html> <head> <title>Bob's Auto Parts - Order Results</title> </head> <body> <h1>Bob's Auto Parts</h1> <h2>Order Results</h2> <?php echo "<p>Order processed at ".date('H:i, js F Y'). "</p>"; ?> </body> </html> Everything came out ok except the "s" part. It says the 217 of August instead of the 2nd of August. Do you know what would cause such an error? Quote Link to comment https://forums.phpfreaks.com/topic/168503-solved-problem-with-date-function/ Share on other sites More sharing options...
Dânêl Posted August 2, 2009 Share Posted August 2, 2009 HI, try to use jS instead of js...and it should works "s" is used for seconds, "S" for the ordinal suffix Quote Link to comment https://forums.phpfreaks.com/topic/168503-solved-problem-with-date-function/#findComment-888878 Share on other sites More sharing options...
johne281 Posted August 2, 2009 Author Share Posted August 2, 2009 Thanks a million. That worked like a charm. Quote Link to comment https://forums.phpfreaks.com/topic/168503-solved-problem-with-date-function/#findComment-888883 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.