This topic is locked

lookup wizard a concat a date in a different format

10/26/2006 7:33:08 PM
PHPRunner General questions
D
Dale author

Ive been fighting with this one most likely because of my inexperience.
I have a look up wizard with a custom expression in Display field.
concat('Vol. ',volume,' No. ',issue,', ',date)
The below concat works fine but displays
Vol. 29 No. 39, 2006-09-27
I would like it to display
Vol. 29 No. 39, Sep 27, 2006
Can anyone point me to how I convert the date format in the concat syntax, or can this not be done this way.
Ive been looking at a lot of web pages but I have not found a solution yet.

J
Jane 10/27/2006

Dale,
use DATE_FORMAT MySQL function.

Here is a sample:

concat('Vol. ',volume,' No. ',issue,', ',date_format(`date`,'%b %e'),', ',date_format(`date`,'%Y'))


You can see more examples here:

http://dev.mysql.com/doc/refman/5.0/en/dat...-functions.html

D
Dale author 10/27/2006

Thanks Jane.

I will try that this morning.
I cant say enough how great this forum is. Great work.