Monday, April 12, 2010

Find occurrence of dates inside a given year?

Hi all,





I have a table containing daily dates of working days through several years.





What I would like to have is to be able to choose a date and then find its corresponding date one year later.





An example would be: the date 2000-01-01 and its corresponding date: 2001-01-01. The problem is that 2000-01-01 wasn't a working day and so I will not be able to find it in my table.





Is there any trick for telling mySQL to find a corresponding date in a certain interval that is also actually found in the table?





Am I clear with my question??





I would be happy to hear your opinion about this :-)





Thanks!

Find occurrence of dates inside a given year?
Don't think of dates as three numbers (day month year) but instead as one compound number (like a computer uses internally). That way instead of looking for dates in the range say 10/10/2006 to 15/10/2006, you can just look in a number range say 75673 to 75782. (These numbers are made up - don't try to read any meaning in them).





As far as I'm aware, dates are already stored like this in most applications - I'm assuming that SQL is no different.





Rawlyn.
Reply:Micron try this link





http://www.google.co.uk/search?hl=en%26amp;q=F...
Reply:You are clear with the question but I don't have an answer. Sorry.

teeth whitening

No comments:

Post a Comment