Here is what I am trying to do, but I get the wrong date:
       $t_data_array[1]=date("m/d/y",mysql_result($db_result,$db_record,'date'));

Then I simply print the value in the array....this date instead of 05/08/01 comes
out 12/31/69

Thanks!

Jon Haworth wrote:

> I think the best way to handle this is not to care what it looks like in the
> database. Store your dates as UNIX timestamps, and then they are easy to do
> calculations on and/or convert to any date format you like for displaying in
> your pages.
>
> Read up on date() and mktime() for more info (there are loads of examples in
> the user notes).
>
> HTH
> Jon
>
> -----Original Message-----
> From: Jack Sasportas [mailto:[EMAIL PROTECTED]]
> Sent: 08 May 2001 17:28
> To: php
> Subject: [PHP] Date & Time Formatting ??
>
> OK I have read many examples, old posts etc, but I am looking for a
> detailed explanation as to how to do this.
>
> First is when I write to a mysql database using the now() function, the
> time stamp looks like so when I display the time back to the browser.
>
> 204:24:06  ( This should have been 12:24pm )
>
> Also the Date Display like so:
>
> 2001-05-08
>
> The Goal is to have the Time stamp looking like 12:24 (military time OK)
>
> and the date 05-08-2001 or even 05-08-01.
>
> The MySQL db looks like so:
>  date       0000-00-00
>  time      00:00:00
>
> I don't seem to really be able to vary the DB format.
>
> Any examples or links to good docs appreciated....
> Thanks...
>
> **********************************************************************
> 'The information included in this Email is of a confidential nature and is
> intended only for the addressee. If you are not the intended addressee,
> any disclosure, copying or distribution by you is prohibited and may be
> unlawful. Disclosure to any party other than the addressee, whether
> inadvertent or otherwise is not intended to waive privilege or confidentiality'
>
> **********************************************************************
>
> --
> 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]

--
___________________________________________________________
Jack Sasportas
Innovative Internet Solutions
Phone 305.665.2500
Fax 305.665.2551
www.innovativeinternet.com
www.web56.net



-- 
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]

Reply via email to