This topic is locked

Format Date values in Concat

1/22/2009 3:47:39 PM
PHPRunner General questions
vin7102 author

Hi,
I would like to change the date format of the date values when I concat two dates for a report search.
This is what I'm using now:

concat(Week_Begin ,' to ' ,Week_End)


It works fine except I would like the date formats of each date as ('%c/%e/%y') where the end result would be

1/22/2009 to 2/15/2009
As of now the result is 2009-01-22 to 2009-02-15

I even tried to edit the sql query for both the Week_Begin and Week_End dates and they look great in the results page but the concat results still revert to the default mysql format.
Thanks

Sergey Kornilov admin 1/22/2009

I recommend to check MySQL DATE_FORMAT function for this purpose:

http://dev.mysql.com/doc/refman/5.1/en/dat...ion_date-format