Solved

print date form mysql database php

Posted on 2008-06-17
3
782 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
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 …

820 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