The thing about that is that the updated also gives you the date, time, update version, etc. All I need is the date and I’m not sure how to extract it accordingly to convert it to seconds.
This would involve converting the timestamp into a string and then using string patterns to extract the date from the stamp.
Here is an article about the topic and how you can extract certain patterns from strings String Patterns
I’ve written a function to extract YYYY-MM-DD from the timestamp here @pwx
local asset = game:GetService(“MarketplaceService”):GetProductInfo(125378389)
local update_stamp = tostring(asset.Updated)
function ConvertTimeStamp(time_stamp)
local date_pattern = “%d%d%d%d%A%d%d%A%d%d”
local stamp_date = string.sub(time_stamp, string.find(time_stamp, date_pattern))
local split_date = string.split(stamp_date, “-”)
local year = split_date[1]
local month = split_date[2]
local day = split_date[3]
local elapsed_years = (year - 1970)
local elapsed_months = month - 1
local elapsed_days = day - 1
return year, month, day
end
print(ConvertTimeStamp(update_stamp))
At this point you’ll need to add in calculating the time in seconds that have elapsed since January 1, 1970 from the converted date, and then subtracting the date converted to seconds against tick() to find the seconds since the last time your asset was updated.