SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Evangelist spoondevil's Avatar
    Join Date
    Jun 2001
    Location
    Harlow, Essex, UK
    Posts
    426
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Week Numbers - Relevant in PHP/MySQL

    In nearly every diary/calender it states the week numbers [#1 to #52] Are these used in the date function of PHP/MySQL? I need to pull out records stored in a database depending on what week they fell in.

    It's for a shop' record of sales, so I need to pull out all sales done, for example, in: Nov 29 - Dec 5 or Dec 6 - Dec 12.

    Is there an easy way to code this? The records are stored in the database width "date_of_sale" as a date field.

    Ian

  2. #2
    SitePoint Wizard swdev's Avatar
    Join Date
    Oct 2004
    Location
    UK
    Posts
    1,053
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    strftime

    with %U, %V or %w as the format string


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •