Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8550487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:57:40+00:00 2026-06-11T13:57:40+00:00

I have a dates in mySQL stored in format 2012-09-16 as DATE format and

  • 0

I have a dates in mySQL stored in format 2012-09-16 as DATE format and I want to output and convert the date into the format date("l F jS").

I am using a while loop to query my table which SELECTS the date:

while($rowWeek=mysql_fetch_assoc($resultWeek)){
    echo date("l F jS", $rowWeek[dt]); 
}

The code above outputs: Wednesday December 31st. For each and every day which tells me that date() doesn’t like the format being used from $rowWeek[dt]

when it should loop through 7 days of the current week.

echo $rowWeek[dt];

outputs the correct dates:

2012-09-16
2012-09-17
2012-09-18
2012-09-19
2012-09-20
2012-09-21
2012-09-22

How do I convert the SELECTED date format of 2012-09-16 and convert it to the more pleasant format of date("l F jS")?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T13:57:41+00:00Added an answer on June 11, 2026 at 1:57 pm

    use strtotime():

    echo date("l F jS", strtotime($rowWeek['dt']));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have several dates stored as varchar in the following format: 01-01-2012 I want
Possible Duplicate: Format mysql datetime with php Well.. I have stored date(c) in Mysql
I have a list of dates stored in MySQL using PHP. These were stored
I have an unavoidable situation where the dates are stored in UK date format,
I have date and time stored in my database as MySQL DATETIME datatype. While
I have a MySQL varchar column full with dates stored in dd-M-yyyy format. E.g:
I have a Mysql table that stores dates in the format (YYYY-MM-DD HH:MM:SS). What
I have tried several mySQL queries to compare a column of dates stored as
I have a mysql database of entries with dates. So what I want is
I am using mysql and have a table (Log_Table) storing user login dates, a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.