TODAY()

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
paul3648
Forum Newbie
Posts: 2
Joined: Fri Jul 09, 2010 8:08 pm

TODAY()

Post by paul3648 »

I am trying to alter some code that reads one database, then inserts the reformatted data into another database.

One line of this code reads:

$cart->due_date = TODAY();

This inserts today's date into the new database as : 2010-07-09

But if I change the line to read:

$cart->due_date = "2010-07-09";

no data is inserted.

Can someone help me understand the format of TODAY() and why I can't exchange it with "2010-07-09"
paul3648
Forum Newbie
Posts: 2
Joined: Fri Jul 09, 2010 8:08 pm

Re: TODAY()

Post by paul3648 »

It's OK - I got the answer...

TODAY() is formatted as 07/09/2010
Post Reply