What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 130 Stack Exchange communities.

I noticed that I recently rolled over to "12 months" on my user profile on Stack Overflow and noticed that I also did not get awarded the yearling badge. I have since figured out that it appears that you need to have "1 year" on your profile before getting said badge. As such, I'm wondering exactly how the "Member for" fields are being calculated, does anyone have any ideas?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

My guess is that it's doing datediff(month, join_date, getdate()), which rounds up in SQL Server.

In this case, you joined 8/13/08. You're two days away from the actual year mark.

datediff(month, '8/13/08', '8/11/09')

Returns 12 in SQL Server, hence, the months in your profile.

share|improve this answer
    
That would make the most sense a little but different from the Oracle way of things though. –  rob Aug 11 '09 at 12:17
3  
Screw Oracle! –  TheTXI Aug 11 '09 at 13:08
    
Don't think so, as I joined '8/30/08' and still get 11 months. –  malach Aug 11 '09 at 13:48
    
@Ralph: You joined 9/3/08. You should get 11 months :) –  Eric Aug 11 '09 at 14:20
    
Why is it then that the sandbox gives me 8/30/08 as my user creation date? –  malach Aug 11 '09 at 15:38
    
I'm using statoverflow.com/sandbox with select FROM_UNIXTIME(CreationDate) from users where Id=3724 and get '2008-08-30 10:32:31' –  malach Aug 11 '09 at 15:42

Curious though, in the examples here that the same date in the PAST is shown as 12 months for one user, and 1 year for another. These two users were recently awarded Yearling.

alt text

and

alt text

Given that the date awarded was Sep 15 2009, and both registered at some point on the 14th of the year previous, how could the calculation give different results?

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .