What do you think everyone is stupid to do such complicated things?
If you don’t need to print the date in a human way, just:
(Example of 2024-11-22)
[rex@test-v7] > :put ([:totime [/system clock get date]])
2864w1d00:00:00
= 20049 days after 01/01/1970
[rex@test-v7] > :put ([:totime [/system clock get date]] + 30d)
2868w3d00:00:00
= 20079 days after 01/01/1970
[rex@test-v7] > :put (2868w3d00:00:00 - 2864w1d00:00:00)
4w2d00:00:00
= 30 days
There is no helper command for it like :todate or :convert from=… to=date to get formatted date from time or timestamp by single command, use function that can be found on forum, @rextended wrote some…
You don’t specify that you use old 7.10, actually the “stable” is 7.16.1 and have more functions than the 7.10
You can use this: http://forum.mikrotik.com/t/convert-uptime-to-date-and-time/157724/36 GLOBAL FUNCTION HERE>>
[rex@test-v7] > :put [$unixtodatetime [:tonum 2868w3d00:00:00]]
2024/12/22 00:00:00
If you do not want " 00:00:00" just remove " $timeStart" from the function, at the end.