[PHP] Re: Newbie Date question
include(Calc.php); #http://www.phpinsider.com/php/code/Date_Calc/ #Date_Calc - a class for manipulating and comparing #Calendar dates, as well as formulating arrays of dates # for traditional calendar display. $yesterday = Date_Calc::prevDay($day=date('d'),$month=date('m'),$year=date('Y'),$format=%m-%Y-%d); Hope that helps. -J On Sun, 14 Jul 2002 23:01:07 +1200, Royw wrote: If: $today = date(Y-m-d); Then how to I get: $yesterday = ? Thanks! -- Jason Morehouse (jm [@] netconcepts [.] com) Netconcepts LTD - Auckland, New Zealand * Linux: Because rebooting is for adding hardware. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Newbie Date Question
try using the date() with the field content. string date (string format [, int timestamp]) David Mitchell [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hey Guys and Girls, I'm selecting a datetime value from SQL Server. In the database the data looks like: 2001-11-16 18:33:56 When I print out the results on the page I get this: 1005958764 This is how I'm displaying the data: while(!$rs-EOF) { print(trtdfont class=smallText . $dtmDate-value . /font/tdtd $rs-MoveNext(); } I'm obviously missing something here Any suggestions would be appreciated. Dave % David Mitchell [EMAIL PROTECTED] www.IceRadio.ca % -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]