Solved

date in fputcsv

Posted on 2010-08-31
3
1,177 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 110

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Ahax pagination 9 47
Php logic to add to date card 9 38
pass foreach data in php into jquery ajax 10 45
Delete image(s) associated with record(s) 16 23
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
This article discusses four methods for overlaying images in a container on a web page
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

762 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