Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 27th, 2006, 06:18 AM
Registered User
 
Join Date: Oct 2006
Location: Amman, , Jordan.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Mahmoud82
Default retrieve date with format (M Y) form database php

hi plz plz help me
i want to retrieve a date i was save it at the database with defult formate i want to retrieve it with this format Month name and the year. and i want to use it at sql query like:

select * from title where date like "your help";
 thanx for your time.

Reply With Quote
  #2 (permalink)  
Old November 30th, 2006, 07:04 AM
Authorized User
 
Join Date: Nov 2006
Location: Bhopal, MP, India.
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to talk2leo
Default

Hi Dear

Suppose in ur database table column name of date is date_date
then SQL query will be like this
"select date_format(date_date, '%b %e %Y at %r') as date from TABLE where ......... ORDER BY DATE"

you can change the order also u want for ur date...see the DATE/TIME format in PHP

Reply With Quote
  #3 (permalink)  
Old November 30th, 2006, 07:10 AM
Authorized User
 
Join Date: Nov 2006
Location: Bhopal, MP, India.
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to talk2leo
Default

in the above query
DATE in ORDER BY clause will be the name u r giving in ur query.
Like
WHERE...ORDER BY date ///in the above this is right

not like ORDER BY DATE///it will give an error

i think u got wat u want if no then just reply me..

REGARDS

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
date format differs, need to force format somehow patricolsson ASP.NET 2.0 Basics 1 December 3rd, 2009 12:53 AM
Convert British format date to American format? fyr PHP How-To 0 December 19th, 2007 03:17 PM
How to retrieve sistem date?? MAKO C# 1 April 12th, 2006 12:59 PM
date format differs, need to force format somehow patricolsson HTML Code Clinic 2 January 12th, 2006 05:55 AM
Date format in ASP and in SQL 2000 Database phungleon Classic ASP Databases 1 December 23rd, 2004 12:57 AM



All times are GMT -4. The time now is 12:24 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.