...

View Full Version : I have no idea if this is possible or not so I thought I ask



Byronwells
02-06-2010, 03:29 AM
Alright guys

I am not sure if this is possible or not, so I thought I ask the experts! You guys!!

I have finally succeed in getting my date up and running.. Finally finally!

Please see here http://www.digitalresellersvault.com/marketplace.php?cat=t&category=Dec_2008

At the moment the full month word is being display.. I am wondering is there any way that we could used shorthand, i.e Jan, Feb, Mar, Apr, Jun, Jul, Aug, Sept, Oct, Nov, Dec instead of the full word for that particular month??

Len Whistler
02-06-2010, 03:37 AM
I am wondering is there any way that we could used shorthand, i.e Jan, Feb, Mar, Apr, Jun, Jul, Aug, Sept, Oct, Nov, Dec instead of the full word for that particular month??


Check the PHP manual, or MySQL for the one letter code.




--------------

Byronwells
02-06-2010, 03:40 AM
Check the PHP manual, or MySQL for the one letter code.




--------------

I dont want one letter.....

Len Whistler
02-06-2010, 03:42 AM
I dont want one letter.....



For PHP: http://php.net/manual/en/function.date.php I believe "M" is what you want.



-------------------

Byronwells
02-06-2010, 03:43 AM
For PHP: http://php.net/manual/en/function.date.php



-------------------

Len

Alright this is the code that I am using to display the date on my page..

$GetProduct = $db->get_rsltset("select *,(SELECT
DATE_FORMAT(product_date, '%M-%d-%Y')) as formatteddate from
".$prefix."products $cond order by id DESC limit $start, $records");


I am already using the letter M to which on my site displays the full month, not the shorthand version...

Len Whistler
02-06-2010, 03:45 AM
Len

Alright this is the code that I am using to display the date on my page..

$GetProduct = $db->get_rsltset("select *,(SELECT
DATE_FORMAT(product_date, '%M-%d-%Y')) as formatteddate from
".$prefix."products $cond order by id DESC limit $start, $records");


I am already using the letter M to which on my site displays the full month, not the shorthand version...

Check MySQL ........ I think it might be %m



--------------------------



-------------

SKDevelopment
02-06-2010, 08:32 AM
%b stands for shorthand month. Yes, of course, it is described in the Manual (http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_date-format).


DATE_FORMAT(product_date, '%b-%d-%Y'))



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum