Working IT i made an SQL query to tell me how many days and months i have quit. It says day 67 is not month 3 yet, sheesh. Hope everyone is doing well and has remained smoke free!
SELECT DateDiff(dd, '3/10/2007 12:00 PM', GetDate()) As [Smoke Free Days]
Written by
nsd_user663_1695
To view profiles and participate in discussions please or .
I had not thought about this yet, dates are so confusing. I won't pretend to know the answer but here's what I am going to do....
Basically, SQL (a lot of automated counters online use this, not all) ignores days when working with months. Anything lower than a month can be calculated the way we would think because its all just math; 60 seconds = 1 minute, 60 minutes = 1 hour, 24 hours = 1 day, 7 days = 1 week, ? weeks = 1 month. At this point it ONLY looks at month and not day, so 5/31/2007 > 6/1/2007 = 1 month. However, 6/1/2007 > 6/2/2007 = 0 months.
Sticking to how we counted days 1, 2, 3, 4 and so on, we needed to complete week 1 before we could say "I have been quit for 1 week". I guess that leaves the only way for us to calculate months for short periods of time is to use a number of days (ill go with 30, because months are relative). So my 68 days = 2.266 Months, I have to hit 90 before i COMPLETE 3 months.
Content on HealthUnlocked does not replace the relationship between you and doctors or other healthcare professionals nor the advice you receive from them.
Never delay seeking advice or dialling emergency services because of something that you have read on HealthUnlocked.