Imagine you have any random date and want find the Monday of the week in which the date appears. The Year Code is 2. @Sai – please write out the steps that you tried and then I will be able to see where you might have made a mistake in the calculation. Many of those days, like Halloween and Mother's Day, are quite well known while others are not. With default settings, the WEEKDAY function treats Sunday as the first day of the week (1), and Saturday as the last day (7). I wanted to make a point for programmers who will use this nice formula to be careful with the Leap Year Code calculations. century code 6 Example – October-07, 1644 @Senthil – did you take into account Julian Dates? Children also have two weeks holiday at Christmas and at Easter, plus a week in mid-October and in mid-February. 76/4=19 By mid-summer, some kids may start to get bored, so it's no surprise that July is National Anti-Boredom month. @Shubha: could you write out all of the steps you performed in detail? To calculate the Year Code, use this formula: YY is the last two digits of the year. Year code 2, Month code 3, Date 24, century code 6. February is full of fun holidays and celebrations. Example: July 4, 1776 (7-4-1776): Year Code: 6, Month = 0 For Einsteins birthday in 1897, the Century Code is 2, because it’s a Gregorian date, and the chart above shows that dates in the 1800s get an adjustment of 2. Century code : 0. By default, Excel assigns 1 to Sunday and 7 to Saturday. but it was a Saturday Einstein’s birthday is 1879, not 1897 … thank you. Train your brain with real-time memory competition software. Note that this will find the next occurrence of the given day - if today is Monday and you're looking for the next Monday, it will return the Monday one week from today.. Match the resulting number in the list below, and you’ll have the day of the week: Here are three more examples from different centuries: Humans set foot on the moon: 20 July 1969: The Battle of Hastings took place on 14 October 1066. Subtracting 1 for the leap year could give you an unwanted negative value. Use our Calculator data in your apps. 30 mod 7 = That’s right, by the end of this article you’ll be able to take any date in the future—or in the past for that matter—and figure out what day of the week it’s going to fall upon. month code 6 In Excel, the concept of "weekday" or "day of week" is based on the idea that each day of of the week has a specific number. you know that you can use modular arithmetic to predict the future? @Christian: check the leap year rules again: “If the date is in a January or February of a leap year, you have to subtract one from your total before the final step.”, (16 + (16 // 4)) % 7 Year code : ((74 div 4) + 74) mod 7 = ( 4 + 4 ) mod 7 = 1 Copyright © 2020 Macmillan Holdings, LLC. 95 mod 7 = @ Josh: Calculation for Month code will be like this Take ’69 and divide by 4, discarding the remainder. @Josh Hi- Apparently, it’s not working for 24th March 2014.