Solved

date in fputcsv

Posted on 2010-08-31
3
1,144 Views
Last Modified: 2012-05-10
fputcsv($fpr,array(date ( 'm-j',$p['dateordered']),date ( 'm-j',$p['returndate'])
));

date is
2010-08-10 15:33:39.000

i am getting
1-Jan

I want
10-Aug
0
Comment
Question by:rgb192
3 Comments
 
LVL 13

Accepted Solution

by:
marchent earned 250 total points
ID: 33570276
replace
date ( 'm-j',$p['dateordered'])


with
date('j-M', strtotime($p['dateordered']) )
0
 
LVL 109

Assisted Solution

by:Ray Paseur
Ray Paseur earned 250 total points
ID: 33571231
When you need to handle date / time fields in PHP and MySQL, this reference may be useful to you.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_201.html
0
 

Author Closing Comment

by:rgb192
ID: 33612688
thanks
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

774 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question