Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2004
    Posts
    1

    Question Best Practice for storing calendar information

    Hello,

    I am wondering what is the best practice for storing calendar information. It just needs to store what date is open or not.

    Year, Month, Calendar (1=Open, 0=Closed)

    2004, 10, 1001111100111110011111001111100
    etc

    or should it go down

    Date, Status
    2004-10-01, OPEN
    2004-10-02, CLOSED
    2004-10-03, CLOSED
    2004-10-04, OPEN
    2004-10-05, OPEN
    etc.

    I have seen it both ways and curious if anyone has come across this and can comment on efficiency, ease of use, space usage, etc.

    Thanks

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    write the sql for how many dates are open in november

    should answer your question

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Quote Originally Posted by r937
    write the sql for how many dates are open in november

    should answer your question

    Yes, or better still: how many dates are open between 17th of October and 13th of December!

Posting Permissions

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