What i want to know is how to find the day of any given date and year???
206207
Okay, this is not going to be pretty, but it works, but only for years from A.D. 1582 and later.\n\nFirst, let M equal the number corresponding to the chosen month according to the following list\n\nJan=11\nFeb=12\nMar=1\nApr=2\nMay=3\nJune=4\nJuly=5\nAug=6\nSep=7\nOct=8\nNov=9\nDec=10\n\nNext, let N equal the day of the month for which you are inquiring.  So if you want to look for August 15, M would be 6 and N would be 15 (M=6, N=15).\n\nNow, take the last two digits from the year you are searching for, call that number Y.  For 1947, Y=47.\n\nThe leftover digits of the year make a new number, call it C.  For 1947, after removing 47 we see that C=19.\n\nFinally, if the year is a leap year, let L=1, otherwise, let L=0.\n\nNow we're ready to get down to business.  The following formula makes use of the greatest integer function (ipart) which essentially means that if you get some number with a decimal, chop off the decimal.  3698.2461 becomes 3698.  OK?  Good.\n\nNow we must calculate the following formula:\nN + ipart(2.6M - 0.2) + Y + ipart(Y/4) + ipart(C/4) - 2C - (1 + L)*ipart(M/11)\n\nAfter calculating this number, divide it by seven and look at the remainder.  The remainder corresponds to the day of the week as follows:\n\n0=Sunday\n1=Monday\n2=Tuesday\n3=Wednesday\n4=Thursday\n5=Friday\n6=Saturday\n\nLet's test this with your August 15, 1947.\n\nSo, M=6, N=15, Y=47, C=19, and since 1947 was not a leap year, L=0.\n\nPlugging these values into the formula we get:\n15 + ipart(2.6*6 - 0.2) + 47 + ipart(47/4) + ipart(19/4) - 2*19 - (1 + 0)*ipart(6/11)\n\n=15 + ipart(15.4) + 47 + ipart(11.75) + ipart(4.75) - 38 - 1*ipart(.5454545454)\n\n=15 + 15 + 47 + 11 + 4 - 38 - 0\n\n=54\n\nDividing this by 7, we get a remainder of 5.\n\nThis says that August 15, 1947, was a Friday.
480233
http://www.wunderground.com/US/OR/Newport.html\nscroll down to History and Almanac box. pick year and date. Select Go.
237581
static Q96 Info = {"Dec", 18, 97.8};\n\nassuming\ntypedef struct _stuff_\n{\nchar *Month;\nint Day;\nfloat Temp;\n} Q96;
619497
12/17/2006\n\n\nIf you use spreadsheets in your computer then you can easily figure out future dates with one simple formula.
25113
get an organiser and write those damn dates down!
158914
I cannot understand your question clearly.\n\nI assume that you have to show an alert before 20 days of a fixed date.\n\nLet fixed date be 1/6/06\n\ndim i as integer\ni=date\n\nNow i will contain the current date of the system.\n\nYou can compare it with the fixed date and show the message box.\n\nHope this is useful.\n\nDo contact me in person on doubts in VB6 and VB.NET through mail.
520907
DATE and DATETIME are different in that DATE only records month day and year, while DATETIME stores hours minutes and seconds, as well.\n\nThe original SQL should still work.\n\nA SQL statement to get years:\n\nSELECT DISTINCT YEAR(datecolumn) AS myyear FROM table ORDER BY myyear ASC\n\nThe problem you may face is that there are not months and years that match up properly. For example, you may have an April 2006 entry, but not an April 2005 entry.\n\nIf none of this seems to work right, you can always cheat it on the PHP side.\n\nFor example, you can simply get all distinct dates from the DB:\n\nSELECT DISTINCT datecolumn FROM table ORDER BY datecolumn ASC\n\nAnd then recycle the resultset for both pulldowns.\n\n<?\n$curmon = 0;\n$curyear = 0;\n$sql = "SELECT DISTINCT datecolumn FROM table ORDER BY datecolumn ASC";\n$rs = mysql_query($sql);\n?>\n<select name="month">\n<?\nwhile($row = mysql_fetch_array($rs)) {\n$date = strtotime($row['datecolumn']);\n$temp = getdate($date);\nif($tep['mon'] != $curmon) {\n$curmon = $temp['mon'];\necho "<option value=&#92;"$curmon&#92;"> $curmon </option>";\n}\n}\nmysql_data_seek($rs, 0);\n?>\n</select>\n\n<select name="year">\n<?\nwhile($row = mysql_fetch_array($rs)) {\n$date = strtotime($row['datecolumn']);\n$temp = getdate($date);\nif($tep['year'] != $curyear) {\n$curyear = $temp['year'];\necho "<option value=&#92;"$curyear&#92;"> $curyear </option>";\n}\n}\n?>\n</select>
286443
May 13th\nJune 11th\nJuly 10th
533085
you are right,lenght of day depends on : date (position of the earth on it's orbit); location on earth (latitude, elevation);  to calculate day/night lenght, longitude is needed only to find mean time of sunrise/set,noon...in calculs, time should be converted to UTM, dates to Julianian dates.\ni don't know formula to calculate length of day/night,but here's some usefull sites:\nhttp://www.gcstudio.com/suncalc.html\nhttp://susdesign.com/sunangle/\nhttp://aa.usno.navy.mil/faq/docs/equinoxes.html
619668
Try boost.org\n\nBoost.Date_Time
477574
a) select <fields> from <table> where <date_field> >= '2006-01-01' and <date_field> <= '2006-12-31'\n\nb) select <fields> from <table> where <date_field> >= '2006-09-01' and <date_field> <= '2006-09-30'\n\nc) select <fields> from <table> where month(<date_field>) = 11\n\nd) select <fields> from <table> where <date_field> >= '2005-05-15 02:00:00' and <date_field> <= '2007-06-04 15:00:00'
449551
Insert this for the Date:\n<h4>It is now  \n<script type="text/javascript">\n<!--\nvar currentTime = new Date()\nvar month = currentTime.getMonth() + 1\nvar day = currentTime.getDate()\nvar year = currentTime.getFullYear()\ndocument.write(month + "/" + day + "/" + year)\n//-->\n</script>\n</h4>\n\nInsert this for Time:\n<h4>It is now  \n<script type="text/javascript">\n<!--\nvar currentTime = new Date()\nvar hours = currentTime.getHours()\nvar minutes = currentTime.getMinutes()\nif (minutes < 10)\nminutes = "0" + minutes\ndocument.write(hours + ":" + minutes + " ")\nif(hours > 11){\ndocument.write("PM")\n} else {\ndocument.write("AM")\n}\n//-->\n</script>\n</h4>
431505
March 4th.\n\nMarch forth.
144529
#include<iostream.h>\n#define isleapyear(year) ((!(year % 4) && (year % 100)) || (!(year % 400) && (year % 1000)))\n\nclass Date\n{\nprivate:\nint  month, day, year;\n \npublic:\nDate(int month,int day,int year):month(month),day(day),year(year){};\nint isdatevalid();\nint weekday();\n\n};\n\n//\n//   return 1 if date is valid, 0 otherwise.\n//\nint Date::isdatevalid()\n{\n  if (day <= 0) return 0 ;\n  switch( month )\n{\n  case 1  :\n  case 3  :\n  case 5  :\n  case 7  :\n  case 8  :\n   case 10 :\n  case 12 : if (day > 31) return 0 ; else return 1 ;\n  case 4  :\n  case 6  :\n  case 9  :\n  case 11 : if (day > 30) return 0 ; else return 1 ;\n  case 2  : \n    if ( day > 29 ) return 0 ;\n      if ( day < 29 ) return 1 ;\n      if (isleapyear(year)) return 1 ;   // leap year\n    else return 0 ;\n}\n  return 0 ;\n}\n\n//\n// given month, day, year, returns day of week, eg. Monday = 0 etc.\n// tested for 1901 to 2099 (seems to work from 1800 on too)\n// \nint Date::weekday()\n{\n  int ix, tx, vx;\n \n  switch (month) {\n    case 2  :\ncase 6  : vx = 0; break;\ncase 8  : vx = 4; break;\ncase 10 : vx = 8; break;\ncase 9  :\ncase 12 : vx = 12; break;\ncase 3  :\ncase 11 : vx = 16; break;\ncase 1  :\ncase 5  : vx = 20; break;\ncase 4  :\ncase 7  : vx = 24; break;\n  }\n  if (year > 1900)  // 1900 was not a leap year\n    year -= 1900;\n  ix = ((year - 21) % 28) + vx + (month > 2);  // take care of February \n  tx = (ix + (ix / 4)) % 7 + day;              // take care of leap year\n  return (tx % 7);\n}\n \n \nint main()\n{\n  char week[7][10] = {\n  "Monday","Tuesday","Wednesday","Thursday",\n"Friday","Saturday","Sunday"\n};\n  Date *d;\n  int  month, day, year;\n  cout<<"Return the day of the week given the date."<<endl;\n  cout<<"Enter date in the form mm/dd/yyyy : ";\n  scanf("%d/%d/%d",&month,&day,&year);\n  d = new Date(month,day,year);\n  if (d->isdatevalid())\n  {\n    cout<<"The day of the week for this date is "<<week[d->weekday()]<<endl;\n  }\n  else\n    printf("%d/%d/%d not a valid date!",  month,day,year);\n  \n  getchar();   // wait \n  getchar();   // 2nd wait needed\n  return 0;\n}
348339
I need the Date of Birth of the Child to Give U the No on which it should OK no problem I will give U the No value for all the letters in ENGLISH then take the DATE total like if it is 12 2+1=3 then the month and the Year total find the figure which is neutral to these 2 and have the name\nA I J Q Y     1\nB K R         2\nC G L S      3\nD M T         4\nE H N  X      5\nU V W         6\n O Z             7\nF P              8
457129
Actually, there's a simpler formula for determining whether a particular year is leap year of not.\n\n\njust simply divide the year by four.\n\nif there's a remainder, it is a non leap year.\n\nif there's no remainder, (the qoutient is a whole number) then it is a leap year.\n\n\nfor example:\n\n1997/4 =499.25 (not leap year)\n\n200/4 = 500 (leap year)\n\n1974/4 = 493.5 ( not leap year)\n\n\nif you don't want to use calculator, juct look at the last two digit of the year,  and the same rule applies.\nif divisible by four, that's leap year\notherwise, that's not
49955
The easiest way to do it would be:\n\nSELECT \n    ID,\n    Term,\n    Type,\n    SearchDate\n    FROM tblTable\nWHERE DATEDIFF (DAY, Searchdate, @Searchdate) = 0\n\nIt basically calculates the difference of days between the stored date and the parameter. If that difference is zero, then it must be the same day.