How to calculate the day of the week based on the date that the date corresponds to.

Updated on workplace 2024-03-22
15 answers
  1. Anonymous users2024-02-07

    coledatetime t(year, mon, day, hour, minu, sec);

    week=;Valid return values range from 1 to 7, with 1 being Sunday, 2 being Monday, and so on. If the status of the coledatetime object is not valid, the return value is afx ole datetime error.

  2. Anonymous users2024-02-06

    The starting day of the week is calculated in different countries, and the beginning of the week is different, some are Monday, some are Sunday, and in some countries the first day of the week is Saturday, which has a lot to do with religion and customs.

    The International Organization for Standardization's international standard ISO 8601 "Data Storage and Exchange Forms, Information Exchange, Date and Time Representation" specifies the representation of date and time, which clearly states that each calendar week begins on Monday and Sunday is the 7th day.

    The national standard adopted by China (the National Standard of the People's Republic of China GB T 7408-2005 "Data Element and Exchange Format, Information Exchange, Date and Time Notation") is the same as the international standard, and it is also based on Monday as the first day of the week.

  3. Anonymous users2024-02-05

    March 7, 321 was a Monday.

    As long as it is a Gregorian calendar, the starting date must be the same. Of course, note that because someone later deleted a number of days for some reason and changed the calendar, the date of the modern calendar is not necessarily the same.

  4. Anonymous users2024-02-04

    The week is calculated from Monday to Sunday.

  5. Anonymous users2024-02-03

    The calculation formula is as follows:Calculate the number of days between two given dates and divide the result by 7. If there is a remainder, the number of days with the remainder is added to the original basis, and then extrapolated, if there is no remainder, it will not change.

    For example: today is Wednesday, May 16, 2018, so what day of the week is July 28, 2018?

    The 16th is not counted as a day, but from May 16th to July 28th.

    1. Calculate how many days are between two given dates

    Number of days in May: 31-16 = 15 days.

    The number of days in June is 30 days.

    The number of days in July is 28 days.

    There are a total of days: 15 + 30 + 28 = 73 days.

    2. Reuse the number of days to divide by 7.

    73 7 = 10 weeks (3 days remaining).

    3. If the remainder is a few, add the number of days with the remainder on the original basis.

    Since the day of the 16th is not counted, the days are counted from the day after the 16th: the week.

    Fourth, week. 5. Saturday.

    So July 28, 2018 is Saturday.

  6. Anonymous users2024-02-02

    Just give a definite date and you can use this formula to calculate the day of the week. The following is calculated based on the day of the 100th anniversary of the founding of the People's Republic of China (October 1, 2049), and the process is as follows:

    w=y+[y/4]+[c/4]-2c+[26(m+1)/10]+d-1

    54 (divide by 7 and balance 5).

    That is, October 1, 2049 (the 100th anniversary of the National Day) is a Friday.

  7. Anonymous users2024-02-01

    If a date is given, calculate what day of the week it is. So what method would you use? Excel can solve this problem. The following is what I bring you about excel to calculate the day corresponding to the date, I hope it will be helpful to you.

    1. Week in English.

    1. Select cell B2 and find the weekday function in the formula.

    2. The "Function Parameters" dialog box pops up, we set the serial number parameter to A2 and the return type parameter to 1.

    3. Now that cell B2 has returned the value of the week corresponding to the date, we enter the state and cut out the formula after the equal sign.

    4. Insert the text function, take the formula cut in the previous step as its value parameter, and then set the format text parameter to dddd.

    5. Place the mouse in the lower right corner of cell B2, hold down the mouse and drag down when the cursor is in the shape of a black solid cross.

    6. OK, the English week corresponding to the date has been obtained, and the effect is as above.

    2. The day of the week is in Chinese.

    1. Enter the formula "=text(weekday(A2,1)," in cell C2"aaaa"and press enter to confirm.

    2. Place the mouse in the lower right corner of the C2 cell, and hold down the mouse and drag it down when it is in the shape of a black solid cross.

    You may also like:1Excel**How to set the date to display vertically.

    2.Excel how to format time to minutes and seconds.

    3.excel20106 how to display the day of the week.

    4.How to automatically display the day of the week in excel**.

    5.Excel Date Formulas and Shortcut Tricks.

  8. Anonymous users2024-01-31

    Summary. Formula: w = y-1) +y-1) 4] -y-1) 100] +y-1) 400] +dy refers to the year is the year d refers to the day is the first day of the year w refers to the day of the week, but to divide by 7 first, take the remainder, no remainder is Sunday, when the remainder is 1, 23, 4, 5, 6, then they are Monday, Tuesday, Wednesday, Thursday.

    To calculate the day of the week when a certain day is, first know some basic knowledge of the calendar: 1. Every year there are 31 days in the month and 30 days. 2. A common year in the Gregorian calendar is 365 days, and a leap year is 366 days.

    3. Calculation of leap years: those that are divisible by 4 are leap years, but those that are divisible by 100 but not by 400 are not leap years. 4. The year after 1 B.C. is the first year of A.D., which is the first year of A.D.

    A.D. 0. 5. January 1, 1 C.E. is a Monday. 6. There are 7 days in a week, and the order is Sunday, Monday to Saturday.

    What's the answer? Formula: w = y-1) +y-1) 4] -y-1) 100] +y-1) 400] +dy refers to the year is the year d refers to the day is the first day of the year w refers to the day of the week, but to divide by 7 first, take the remainder, no remainder is Sunday, when the remainder is 1, 23, 4, 5, 6, then they are Monday, Tuesday, Wednesday, Thursday.

    To calculate the day of the week, we first know some basic knowledge of the calendar: 1. There are 31 days and 30 days in the month of each year. 2. The Gregorian calendar is 365 days in a common year and 366 days in a leap year.

    3. Calculation of leap years: those that are divisible by 4 are leap years, but those that are divisible by 100 but not by 400 are not leap years. 4. The year after 1 B.C. is the first year of A.D., which is the first year of A.D.

    A.D. 0. 5. January 1, 1st year of the year of the public friend pants yuan is a Monday. 6. There are 7 days in a week, and the order is Sunday, Monday to Saturday.

    For example, October 1st, 2010 National Day, what day of the week? Then y is 2010, d = the sum of each month = 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 1 = 274 days.

    w=2010-1+502-20+5+274=2770,2770 divided by 7 remainder buried in 5, it is Friday.

    So strenuous? Yes, calculated by formula, it is like this at the moment.

  9. Anonymous users2024-01-30

    As you step into 2006. If on a certain day, you know what day of the month it is, but you don't know what day of the week it is, you just have to memorize these 12 numbers in order, and I will teach you another way to calculate the day of the week, so that you can figure out the day of the week in a few seconds.

    The above 12 numbers, from left to right, are from January to December 2000, for example, 5 in January and 1 ...... in FebruaryCalculate the work as: (**10 dates) 7. After calculation, if it can be removed, it will be Sunday. If it is not divided, the remainder is the number, that is, the day of the week; If the dividend (**10 date) is less than 7, then the dividend is equal to the number of days, which is the day of the week.

    For example, on February 5, the formula is (1 5) 7 6 7, and the dividend is 6, less than 7, which is Saturday.

    On May 12, the formula was (0 12) 7 12 7 1 ......The remainder of 5 is 5, and the day is Friday;

    On March 12, the formula is (2 12) 7 14 7 0, which is exactly divided (the remainder is 0), and it is a Sunday.

  10. Anonymous users2024-01-29

    The Zeeller formula is a formula for calculating the day of the week, and the day of the week is calculated by using this formula.

    w: week; w to 7 modular: 0-sun, 1-monday, 2-tuesday, 3-wednesday, 4-thursday, 5-friday, 6-saturday.

    c: Century minus 1 (first two digits of the year).

    y: year (last two digits).

    m: month (m is greater than or equal to 3, less than or equal to 14, that is, in Zealer's formula, the month of a certain year should be counted as the month of the previous year, for example, January 1, 2003 should be counted as December 1, 2002).

    d: Day [stands for rounding, i.e. only the integer part.]

    For example, the day of the week on the 100th anniversary of the founding of the People's Republic of China (October 1, 2049) is calculated as follows:

    w=y+[y/4]+[c/4]-2c+[26(m+1)/10]+d-1

    54 (divide by 7 and balance 5).

    That is, October 1, 2049 (the 100th anniversary of the National Day) is a Friday.

  11. Anonymous users2024-01-28

    Topic: What day of the week is September 21, 2003?

    Analysis: From January 1, 2003 to September 21, 2003, there were 264 days 264 7 = 3 surplus 5

    This can be seen from the remaining number 5.

    September 21, 2003 was a Sunday.

  12. Anonymous users2024-01-27

    n = product of years + product of days (1: Sunday, 2: Monday, 3: Tuesday, 4: Wednesday, 5: Thursday, 6: Friday, 7: Saturday).

    The product of the number of years: 5*(x-1) The product of the decimal part of 28 multiplied by 7 (rounded) (x represents the number of years in the Common Era).

    Product of days: the remainder of y 7 (y indicates the number of days that have elapsed in the current year).

    For example, what day is April 24, 2019?

    5*(2019-1) 28=, take the decimal part, and round 2 to be the product of the number of years.

    31+28+31+24)/7=16...2, so the number of days is 2(31 days in odd-numbered months in the first half of the year, 31 days in even-numbered months in the second half of the year, 28 days in February, 365 days in a year).

    n=2+2=4, so it's Wednesday.

    Another example: What day is May 12, 2008?

    5*(2008-1) 28=, take the decimal part, and round 2 to be the product of the number of years.

    31+29+31+30+12)/7=17...0, so the number of days is 0(29 days of February in leap years).

    n=2+0=2, so it's Monday.

  13. Anonymous users2024-01-26

    Topic: What day of the week is September 21, 2003?

    Analysis: From January 1, 2003 to September 21, 2003, there were 264 days 264 7 = 3 surplus 5

    This can be seen from the remaining number 5.

    September 21, 2003 was a Sunday.

  14. Anonymous users2024-01-25

    There is no formula, you have to count the number of days and divide by 7, and see the remainder push the day of the week.

  15. Anonymous users2024-01-24

    n = product of years + product of days (1: Sunday, 2: Monday, 3: Tuesday, 4: Wednesday, 5: Thursday, 6: Friday, 7: Saturday).

    The product of the number of years: 5*(x-1) The product of the decimal part of 28 multiplied by 7 (rounded) (x represents the number of years in the Common Era).

    Product of days: the remainder of y 7 (y indicates the number of days that have elapsed in the current year).

    For example, what day is April 24, 2019?

    5*(2019-1) 28=, take the decimal part, and round 2 to be the product of the number of years.

    31+28+31+24)/7=16...2, so the number of days is 2(31 days in odd-numbered months in the first half of the year, 31 days in even-numbered months in the second half of the year, 28 days in February, 365 days in a year).

    n=2+2=4, so it's Wednesday.

    Another example: What day is May 12, 2008?

    5*(2008-1) 28=, take the decimal part, and round 2 to be the product of the number of years.

    31+29+31+30+12)/7=17...0, so the number of days is 0(29 days of February in leap years).

    n=2+0=2, so it's Monday.

Related questions
7 answers2024-03-22

1. YYYYY, mm, dd, and dd day conversion.

If we meet 2018-09-01, this kind of date, how should we convert it? >>>More

12 answers2024-03-22

Remember the dates of the 2nd equinox (spring and autumn equinox) and 2nd solstice (summer solstice, winter solstice), as well as the change in the position of the direct sun. Let's take a look at this by yourself or read the textbook, no. >>>More

9 answers2024-03-22

The decimal part of the date variable with a value of less than 1 corresponds to the time of day from 0:00:00 to 24:00:00 >>>More

6 answers2024-03-22

Changing the date a file was created or changing the date a file was modified can be done by changing the time on your computer. Set the time on the computer to the desired time, then make a copy of the corresponding file and enter the file again and click the save button. At the same time, you can delete the previous file and keep the existing file as needed. >>>More

12 answers2024-03-22

The new SN rules for Huawei phones are as follows:

The method of identifying the production date according to the SN: counting from left to right, the 6th to 10th digits of the SN number are the production date, and the 6th and 7th digits are the representative years, such as 15 represents 2015; The 8th digit is the month, which is represented by the numbers 1 - 9 and a, b, and c, where a, b, and c represent 10, 11, and 12 months, respectively; The 9th and 10th places are the day. For example: >>>More