So from users.roblox API I get the timestamp
2021-07-30T13:12:28.507Z
how to convert it to normal timestamp?
So from users.roblox API I get the timestamp
2021-07-30T13:12:28.507Z
how to convert it to normal timestamp?
Use OS.Time. i have forgotten its functions though it’s used to convert but figure out the functions i guess
Or you could just do string.len()
Do you know the format name of this timestamp that i post? Because it has like Z, T etc
I think your solution is right, because I think it’s ISO.
I know this is not what I asked, well I already put yours as solution, but do you know how to compare DateTime?
If you are trying to compare ISO to seconds, you can do DateTime.fromisoDate(IsoDate).UnixTimestamp - Seconds
No, i wanna compare like the datetime of that iso to date time now, can I?
Yes you can do
DateTime.now().UnixTimestamp - DateTime.fromisoDate(IsoDate).UnixTimestamp
And that resulting in seconds right, is there any like instant way to format it to years etc or you have to do it manually?
How I know is using os time, but I dont exactly know how to convert this seconds into year month day etc
Ah so when i get the result
i can make it print(DateTime.fromUnixTimestamp(Result):ToUniversalTime) or yeah toLocalTime
Yes?
Yes, that will print out the table I sent above
It has error
{
[“Day”] = 25,
[“Hour”] = 22,
[“Millisecond”] = 0,
[“Minute”] = 2,
[“Month”] = 10,
[“Second”] = 39,
[“Year”] = 1970
it gives me this result.
How to make it the year -1970, because I think why Year = 1970 because yeah unix started from 1970
Are you trying to get the date of the ISO, if yes don’t minus the result.
This is because you are doing CurrentTime - ISO