Ways on how to get a players join date

Hello there developer, if you have ever been wondering how to get a players Roblox join date but you haven’t be able to? Well I have the solution for you.

I will show the code for both Local and Server sided scripts so you’re able to use both or just one when needed!

Local

You can use this code in a LocalScript to print out the players join date!

local Player = game.Players.LocalPlayer

local joinTime = os.time() - (Player.AccountAge*86400)
local joinDate = os.date("!*t", joinTime)

print(joinDate.day, joinDate.month, joinDate.year)

Thats how simple it is!

Server

game.Players.PlayerAdded:Connect(function(Player)
    local joinTime = os.time() - (Player.AccountAge*86400)
    local joinDate = os.date("!*t", joinTime)

    print(joinDate.day, joinDate.month, joinDate.year)
end)

You may use this however you like, I hope you found this helpful!

-TaxFraudBruh

27 Likes

I understand the script just not the timing it by 86400

5 Likes

A day has 86,400 seconds (60 seconds * 60 minutes * 24 hours = 1 day), and Player.AccountAge is in terms of days. Multiplying it by 86,400 is just to convert the value to seconds.

Anyways, simple and nice tutorial, but I think this should lie in #resources:community-tutorials.

5 Likes

Thanks for the feedback! And I have changed it to #resources:community-tutorials.

3 Likes

Does this factor in leap years?

2 Likes

Not sure, but it still did show the exact join date.

1 Like