...

View Full Version : Resolved Date() doesn't display with numbers?



RonnyNishimoto
07-12-2012, 03:41 AM
I was looking through w3schools PHP tutorial and noticed that the output of one of the examples didn't match what I got. I am running on an Apache server (localhost), so it might possibly be a settings problem or?

http://www.w3schools.com/php/php_date.asp



<?php
echo date("Y/m/d") . "<br />";
echo date("Y.m.d") . "<br />";
echo date("Y-m-d");
?>


The output of the code above should be something like this:
2009/05/11

The output I got was like this:
2012/Jul/Thu

mlseim
07-12-2012, 03:47 AM
See this:
http://php.net/manual/en/function.date.php

If you can't get it to display correctly, then something
is either wrong with your script, or your server is over-riding something?

RonnyNishimoto
07-12-2012, 03:55 AM
HOHOHOHOHOHOHOHOHOHOHO! HAHAHAHAHA

You said something may have been wrong with my script! So I checked again!!!

I used:
echo date('Y/M/D');

When it was supposed to be:
echo date('Y/m/d');

Sorry about that ;)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum