Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

print date form mysql database php

Posted on 2008-06-17
3
Medium Priority
?
787 Views
Last Modified: 2012-05-05
<?php echo $row_billhead1['dateIssuse']; ?>

The output is  2008-06-18 13:44:03   how can i change it to 18-06-2008
0
Comment
Question by:teera
[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
  • 2
3 Comments
 
LVL 1

Expert Comment

by:MikeBusby
ID: 21810659
Whats the field type in your database?

time?

or just text?

if its time then you can manipulate it.. but if its text you could still do it with string manipulation but thats alot harder...
0
 
LVL 6

Expert Comment

by:deresh
ID: 21810738
here you go ;)


<?php echo date("d-m-Y",strtotime($row_billhead1['dateIssuse']) ?>

Open in new window

0
 
LVL 6

Accepted Solution

by:
deresh earned 1200 total points
ID: 21810739
sorry this one is correct, missing ) in last one :)


<?php echo date("d-m-Y",strtotime($row_billhead1['dateIssuse'])) ?>

Open in new window

0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

670 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