Skip to main content
GameDev.net gamedev.net
🔒 Locked

Calendar Math

Started by MattMcFarland Jun 26, 2006 at 9:08 AM 2 replies 1.4k views
Original Post
MattMcFarland
MattMcFarland
Hey guys, I have a complicated math question that I'm trying to figure out and I don't know where to ask this except here because it has to do with programming. First, let me describe to you my position. I am an office manager and database administrator / IT professional for the company I work for. I am currently reconstructing my database, and I'm using MS ACCESS 2002. I have level 3 + programming certs and am 200% capable of doing just about anything with MS ACCESS 2000-2003. My question, is that we are a contracting company and we currently have to manually create each new calendar month to the year for our install schedule. Now, I was told in class that using Modulo you can figure out what day (sun-sat) it will be in the 5th of June in say, 2011. Now, with that in mind, I'm sure that I could create a button that you would click that would automatically generate the next month accurately. This would be great because I have to develop each month manually and it would save me some time. I was wondering if anyone can direct me to the mathematical formula along with a few very simple examples on figuring out what the next month's days would be. ie: knowing what day would be the 1st, what day would be the 31st, and if the last day would be say the 28th. If anyone knows how to do this please do share with me. I'm sorry if this doesn't fit the context of this forum, and if so, if you could kindly direct me to a forum more suitable to this question I would be more than appreciative. Thanks alot in advance, Matt!
--------------------------------Royalty-Free Music for your games including freeware games for you to enjoy!www.mattmcfarland.com
phi
phi
I'm not sure how to use Access so I can't help you there. However, this might be of some use:
http://www.tondering.dk/claus/cal/img5.png
It's the algorithm that calculates the day.
More info on this site:
http://www.tondering.dk/claus/cal/node3.html

hth
Cambo_frog
Cambo_frog
Hi Matt,

Have you tried using the Weekday() function in conjunction with the WeekdayName() function?

HTH,
Cambo_frog
For the love of god, please tell me that you've just omitted your error checking code for brevity, and you don't really assume that all those functions succeed.
MattMcFarland
MattMcFarland
I really appreciate your comments guys, thanks alot and may your coding endeavors be bright!! :D
--------------------------------Royalty-Free Music for your games including freeware games for you to enjoy!www.mattmcfarland.com

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.