Forum Moderators: coopster & phranque

Message Too Old, No Replies

MySQL date_time()

geesh - not again

         

lorax

5:12 pm on Oct 28, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I need to convert a MySQL date:time stamp into a more readable format so I want to use date_time() in my SELECT statement. I thought I had everything setup correctly but I'm not getting any output - as in zilch (nor errors for that matter). The rest of the SELECT statement works fine and I can see the results.

The SELECT statement is:

SELECT e_id,e_title,DATE_FORMAT('e_start', '%M %e, %Y'),e_org

SO, I'm left to ask if #1 the select statement can have other column names besides the date_format() and #2 I assumed that the column name for the modified date would be the same name so I can call it from the array like this:

result_array["e_start"]

lorax

5:54 pm on Oct 28, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Never mind - I just realized I had forgotten to add the "as date" string.

Slade

7:36 pm on Oct 28, 2002 (gmt 0)

10+ Year Member



if its working for you now, it shouldn't matter but 'date' is a reserved word in ANSI sql, but its allowed by MySQL.

[mysql.com...]

lorax

9:20 pm on Oct 28, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks Slade,
You're correct. Poor example on my part. :)