RE: [PHP] Date & Time Formatting ??

2001-05-08 Thread Don Read
On 08-May-01 Jack Sasportas wrote: > > 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 -00-00 > time 00:00:00 > > I don't seem to really be able to vary the DB form

RE: [PHP] Date & Time Formatting ??

2001-05-08 Thread Jon Haworth
2001 17:46 To: php Subject: Re: [PHP] Date & Time Formatting ?? 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 arraythis date instead of 05/08/0

Re: [PHP] Date & Time Formatting ??

2001-05-08 Thread Jack Sasportas
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 arraythis date instead of 05/08/01 comes out 12/31/69 Thanks! Jon Haworth wrote: > I think the best way to handle

RE: [PHP] Date & Time Formatting ??

2001-05-08 Thread Jon Haworth
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

Re: [PHP] Date/Time Formatting

2001-01-20 Thread Jeff Lacy
When you are doing you select try something more along the lines of: select date_format(date, '%e,%c,%Y') from tblmycoolstuff; I got most of this stuff from http://www.mysql.com/doc/D/a/Date_and_time_functions.html You need to look at the table on that page to get the date to print out exactly a

Re: [PHP] Date/Time Formatting

2001-01-19 Thread Richard Lynch
> Also I'd like to if possible to be able to enter and display the date in > Australian / European Time format (DD,MM,) > I'm currently entering it on the form using three text fields and then > rearanging them to the Format in mySQL and indserting it as a string, but I > don't know how to 'br

Re: [PHP] Date/Time Formatting

2001-01-19 Thread Ignacio Vazquez-Abrams
On Fri, 19 Jan 2001, Jamie wrote: > I'm fairly new to SQL and PHP and I'm haveing trouble useing the Date > functions of Both Systems, so I'd be greatfull if someone can help. > What I'm trying to do is have an 'administrator' be able to enter info > through a form to a mySQL database. Then on a