Jump to content

[SOLVED] date problem


vampke

Recommended Posts

Hi guys,

 

I'm trying to get a very simplr function in this script i'm writing, but for some reason I don't get the right result.

 

I have this code

$day = date(Y-M-D);

and a bit further in the html code:

<?php echo ($day); ?>

 

this returns the value "0". Why won't it give me today's date?

Link to comment
Share on other sites

thanks that was fast!

but it doesn't do what i need:

I want to get the format so thoday's date will return 2007-11-16, your solution returns 2007-Nov-Fri

 

I actually need to compare this with another $date, is this possible? or should i go about this differently?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.