Solved

print date form mysql database php

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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 count occurrences of each item in an array.

864 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

23 Experts available now in Live!

Get 1:1 Help Now