Solved

print date form mysql database php

Posted on 2008-06-17
3
772 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
  • 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 300 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
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…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
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 …

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now