KrAzY Posted February 16 Share #1 Posted February 16 Just did a stupid math problem for my kid.. check my math. someone knocked their thinking noodle and could not remember their day of birth. The dumbass remember he has his 1 billion seconds birthday on 9/3/2021 @ 5:43:40pm i came up with 12/26/1989 @ 4:19:14am was I close? Link to comment Share on other sites More sharing options...
Dottleshead ★ Posted February 16 Share #2 Posted February 16 Find out the number of seconds in a year and use it as the divisor for 1 billion to get the years. Then subtract the number of year from the current year and take whatever is left over and convert those seconds into days. Once you have the real days, count the days from January 1 at midnight and take into account leap year. The remaining seconds left over from the days can be converted to hours and seconds to give you the time of day. 2 Link to comment Share on other sites More sharing options...
Bikeguy Posted February 16 Share #3 Posted February 16 47 minutes ago, KrAzY said: was I close? I used Excel. 1 2 Link to comment Share on other sites More sharing options...
Dottleshead ★ Posted February 16 Share #4 Posted February 16 Or use an Excell spreadsheet!! 2 1 1 Link to comment Share on other sites More sharing options...
Bikeguy Posted February 16 Share #5 Posted February 16 8 minutes ago, Dottleshead said: Or use an Excell spreadsheet!! You just need to remember Excel uses integers for days. And hours, minutes and seconds need to be converted to days before you can do any math. A custom date time format is an easy way do display the result. Yeah... I'm a geek... Link to comment Share on other sites More sharing options...
Bikeguy Posted February 16 Share #6 Posted February 16 Then again... there have been several leap seconds added to the 'official' clock since 1989. https://en.wikipedia.org/wiki/Leap_second https://www.nist.gov/pml/time-and-frequency-division/time-realization/leap-seconds I'll guess leap seconds are not counted in Excel. 1 1 Link to comment Share on other sites More sharing options...
Dottleshead ★ Posted February 16 Share #7 Posted February 16 28 minutes ago, Bikeguy said: Then again... there have been several leap seconds added to the 'official' clock since 1989. https://en.wikipedia.org/wiki/Leap_second https://www.nist.gov/pml/time-and-frequency-division/time-realization/leap-seconds I'll guess leap seconds are not counted in Excel. Lot's of ways to go here. If you know the number of seconds, there are websites that will automatically convert it to the date. Or if you have a program language, there are many libraries that convert microseconds into dates. https://www.epochconverter.com/ 1 Link to comment Share on other sites More sharing options...
Dottleshead ★ Posted February 16 Share #8 Posted February 16 But I think @KrAzY is probably looking for the algorithm on how to figure it out from scratch. In this problem it’s all about converting time units into calendar dates. Link to comment Share on other sites More sharing options...
Bikeguy Posted February 16 Share #9 Posted February 16 If you need to show some more math. 2 Link to comment Share on other sites More sharing options...
Bikeguy Posted February 16 Share #10 Posted February 16 38 minutes ago, Dottleshead said: But I think @KrAzY is probably looking for the algorithm on how to figure it out from scratch. OK... showing the math for the answer. 1 Link to comment Share on other sites More sharing options...
Bikeguy Posted February 16 Share #11 Posted February 16 1 Link to comment Share on other sites More sharing options...
MickinMD ★ Posted February 16 Share #12 Posted February 16 1 hour ago, Bikeguy said: You just need to remember Excel uses integers for days. And hours, minutes and seconds need to be converted to days before you can do any math. A custom date time format is an easy way do display the result. Yeah... I'm a geek... Good work. I often play with dates to generate numbers in my financial spreadsheets. You can add and subtract dates in Excel (or the absolutely free and as good as Excel WPS Spreadsheets) to get a numerical result. For example, I have a spreadsheet cell that calculates my avg. annual return for the 2020's where the number of years in the 2020's must be calculated. The number of years in the 2020's is 4 (2020-3) plus the fraction of a year in 2024. My formula is: (4+(TODAY()-$A$29)/365.25) where $A$29 is 12/31/23 so (TODAY()-$A$29) generates the number of days in 2024. 365.25 is a close-enough approximation of the avg. days in the years. By the way, my stocks are kicking the S&P 500's ass in the 2020's even after losing in 2020 itself: Link to comment Share on other sites More sharing options...
Dottleshead ★ Posted February 16 Share #13 Posted February 16 3 hours ago, MickinMD said: Good work. I often play with dates to generate numbers in my financial spreadsheets. You can add and subtract dates in Excel (or the absolutely free and as good as Excel WPS Spreadsheets) to get a numerical result. For example, I have a spreadsheet cell that calculates my avg. annual return for the 2020's where the number of years in the 2020's must be calculated. The number of years in the 2020's is 4 (2020-3) plus the fraction of a year in 2024. My formula is: (4+(TODAY()-$A$29)/365.25) where $A$29 is 12/31/23 so (TODAY()-$A$29) generates the number of days in 2024. 365.25 is a close-enough approximation of the avg. days in the years. By the way, my stocks are kicking the S&P 500's ass in the 2020's even after losing in 2020 itself: Only the executive guys or anal budgeters use Excell. Link to comment Share on other sites More sharing options...
Kzoo Posted February 16 Share #14 Posted February 16 You forgot to carry the 1. 1 1 Link to comment Share on other sites More sharing options...
Bikeguy Posted February 16 Share #15 Posted February 16 2 hours ago, Dottleshead said: Only the executive guys or anal budgeters use Excell. My boss gave me the opportunity to work on our department budget every month. Yeah our company used Excel for that. What a pain that was. I got good at robbing Peter to pay Paul. We didn't go over budget. It took a few conference calls with the Financial person to learn how they think about documentation for the budget. They didn't teach me anything about that in mechanical engineering classes. Yeah I'm glad I retired. 1 2 Link to comment Share on other sites More sharing options...
Bikeguy Posted February 16 Share #16 Posted February 16 41 minutes ago, Kzoo said: You forgot to carry the 1. No I didn't. I got the same answer 2 different ways. Link to comment Share on other sites More sharing options...
KrAzY Posted February 16 Author Share #17 Posted February 16 Well I look stupid now.. I did it all on papeR to get my answer.. maybe I should have used the computer. I had this down before asking y’all for help. Also don’t mind all the stupid ways I do math.. it’s really confusing to others but I understand it 1 2 Link to comment Share on other sites More sharing options...
Bikeguy Posted February 16 Share #18 Posted February 16 You did good. You got the correct date. Later today I'll look at you math to see what 1 you forgot to carry. 1 1 Link to comment Share on other sites More sharing options...
bikeman564™ Posted February 16 Share #19 Posted February 16 8 hours ago, Bikeguy said: I used Excel. well done, Excel is awesome Link to comment Share on other sites More sharing options...
bikeman564™ Posted February 16 Share #20 Posted February 16 20 minutes ago, KrAzY said: I did it all on papeR to get my answer.. I prefer this method, but use Excel a lot, specially if I'll be changing variables upstream in the equation because it saves time. Link to comment Share on other sites More sharing options...
Bikeguy Posted February 16 Share #21 Posted February 16 2 minutes ago, bikeman564™ said: I prefer this method, but use Excel a lot, specially if I'll be changing variables upstream in the equation because it saves time. This... And it's easier to read compared to my writing. Link to comment Share on other sites More sharing options...
jsharr ★ Posted February 16 Share #22 Posted February 16 I ask Uncle Google for help with my homework Link to comment Share on other sites More sharing options...
KrAzY Posted February 16 Author Share #23 Posted February 16 5 minutes ago, jsharr said: I ask Uncle Google for help with my homework Uncle google touches me in my no no square.. we are not allowed to talk to each other anymore 1 Link to comment Share on other sites More sharing options...
Razors Edge ★ Posted February 16 Share #24 Posted February 16 58 minutes ago, Bikeguy said: You got the correct date. It didn't ask for the "date". It asked for the DAY. Link to comment Share on other sites More sharing options...
Bikeguy Posted February 16 Share #25 Posted February 16 43 minutes ago, Razors Edge said: It asked for the DAY. Just use a computer callander for that. Or.... you can use Excel to calculate the DAY too. Link to comment Share on other sites More sharing options...
Razors Edge ★ Posted February 16 Share #26 Posted February 16 Just now, Bikeguy said: Just use a computer callander for that. Or.... you can use Excel to calculate the DAY too. Well...we're waiting!!!! Link to comment Share on other sites More sharing options...
Bikeguy Posted February 16 Share #27 Posted February 16 1 minute ago, Razors Edge said: Well...we're waiting!!!! I've got stuff to do .. later today I'll use Excel to calculate the day. 1 Link to comment Share on other sites More sharing options...
Kzoo Posted February 16 Share #28 Posted February 16 2 hours ago, Bikeguy said: You did good. You got the correct date. Later today I'll look at you math to see what 1 you forgot to carry. There you go. I knew I was right. The last time I was wrong was May of 19.... Wait, that's wrong. Link to comment Share on other sites More sharing options...
Razors Edge ★ Posted February 16 Share #29 Posted February 16 1 hour ago, Bikeguy said: I've got stuff to do .. later today I'll use Excel to calculate the day. 1 Link to comment Share on other sites More sharing options...
Bikeguy Posted February 16 Share #30 Posted February 16 2 hours ago, Razors Edge said: Well...we're waiting!!!! I'm still not home. Waiting for WoBG to come out of a store. It could be awhile. This is the Excel function to use to calculate the day of the week. https://support.microsoft.com/en-us/office/weekday-function-60e44483-2ed1-439f-8bd0-e404c190949a If you want the name (rather than a number) of the day displayed the Choose function can probably do that. Or a lookup table. Link to comment Share on other sites More sharing options...
Bikeguy Posted February 16 Share #31 Posted February 16 6 hours ago, Razors Edge said: It asked for the DAY. Tuesday (cell A14) and this is how you calculate the day in Excel. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now