Jump to content

Archived

This topic is now archived and is closed to further replies.

scoorton

Need Date Query

Recommended Posts

I need a mysql statement that does the following if I provide two dates such as 06-01-2006 thru 06-07-2006. Which will return the day of the week (Thurdsday, and the date 06-01-2006). So it would have two items as follows:

2006-01-10 Thursday
2006-01-11 Friday
2006-01-12 Saturday
etc.

Thanks
Scott

Share this post


Link to post
Share on other sites
Can you try that explanation again, please? What's it got to do with MySQL and why are there three date items in the list example you gave when your question appears to refer to two?

Share this post


Link to post
Share on other sites
I need a mysql query that if I feed the the query two dates such as 2006-06-01 and 2006-06-07, I need the query to spit out the date and the day of week. as stated above.

So the user inputs two dates to search between and the query will take that and generate the following.

2006-06-01 Thursday
2006-06-02 Friday
2006-06-03 Saturday

I need these to process the rest of the php script and I know that mysql can produce these items.

Thanks
Scott

Share this post


Link to post
Share on other sites
That still doesn't make sense -- I don't understand what the date range has to do with this. What do you want MySQL to do with each date?

Share this post


Link to post
Share on other sites
I have a scheduling script that shows the days of the business week. Mon-Fri. So the user can input two dates into a form to search for that weeks appts. So I need to gather each of those dates so june 1 thru June 7 and the days that those dates fall on. Such as June 2 is a Wednesday. June 3 a Thursday. Then I take that info into an array and grab the scheduled appts for those dates and display to the screen according to the day of the week. Mon Tues Wednes etc.

Cause we only need the business days appt since that is when they are only scheduled.

Share this post


Link to post
Share on other sites
I still don't know what you want MySQL to do -- the input 2 dates, and you want the days of the week? That doesn't make sense.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.