2 messages in com.mysql.lists.win32Re: Trying to get Monday's date with ...| From | Sent On | Attachments |
|---|---|---|
| rob spijkerman | 16 Feb 2003 14:47 | |
| Ignatius Reilly | 17 Feb 2003 00:38 |
| Subject: | Re: Trying to get Monday's date with a known week number.![]() |
|---|---|
| From: | Ignatius Reilly (igna...@free.fr) |
| Date: | 02/17/2003 12:38:21 AM |
| List: | com.mysql.lists.win32 |
Hi,
(Disclaimer: I hate Mondays.)
You can try this:
1. Select all days of the current year that belong to the current week or a previous one (you can do a cross-join of a "months" table ( 01..12) and a "days" table ( 01..31 ) created for this purpose - anyway those are always useful auxiliary tables to have around)
2. Select the max date thereof which is a Monday ( DAYOFWEEK() function)
HTH Ignatius
____________________________________________
----- Original Message ----- From: "rob spijkerman" <rob....@alliedtelesyn.co.nz> To: <win...@lists.mysql.com> Sent: Sunday, February 16, 2003 11:47 PM Subject: Trying to get Monday's date with a known week number.
Hi all
This problem is proving to be somewhat vexing.
I am trying to create a function that will return mondays date with the only input being the known week number.
I am using MYSQL and PHP, but looking through the MYSQL Date Time functions in the manual I cannot see any reason why I cannot derive this value with the MySQL query itself. Does anyone have any suggestions on the best way to achieve this.
Kindest Regards
Rob Spijkerman
------------------------------------------------------------- Rob Spijkerman 27 Nazareth Avenue Senior Software Engineer PO Box 8011 Allied Telesyn Research Christchurch Phone +64 3 339 3000 New Zealand DDI +64 3 339 9569 Email: rob....@alliedtelesyn.co.nz Fax +64 3 339 3001 web: http://www.alliedtelesyn.co.nz/
-------------------------------------------------------------
NOTICE: This message contains privileged and confidential information intended only for the use of the addressee named above. If you are not the intended recipient of this message you are hereby notified that you must not disseminate, copy or take any action in reliance on it. If you have received this message in error please notify Allied Telesyn Research Ltd immediately. Any views expressed in this message are those of the individual sender, except where the sender has the authority to issue and specifically states them to be the views of Allied Telesyn Research.
--------------------------------------------------------------------- Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before posting. To request this thread, e-mail win3...@lists.mysql.com
To unsubscribe, send a message to the address shown in the List-Unsubscribe header of this message. If you cannot see it, e-mail win3...@lists.mysql.com instead.




