Hi, I'm building a dashboard using Meraki's API for my job, and they want me to have a list of recently logged in/active Meraki Admin accounts. My problem is that I am getting some very weird timestamps in the lastActive field that I am having trouble interpreting, here is an example of one of the responses I am getting:
{"name":"xxxxx","email":"xxxx","id":"xxxx","networks":[],"tags":[],"twoFactorAuthEnabled":xxxx,"lastActive":1559588125,"accountStatus":"xxxx","hasApiKey":xxxxxx,"orgAccess":"xxxxxxxxxx"}
Any help figuring out the format of that timestamp would be much appreciated.
Thanks,
Jansen
Solved! Go to Solution.
Thanks!
You can format it using datetime:
>>> tmpDate=datetime.fromtimestamp(<timestamp var>)
>>> tmpdate.strftime("%B %d, %Y - %H:%M:%S%p")
'June 03, 2019 - 14:55:25PM'
I just needed to know the format, converting it to a C# DateTime was the easy part for me. Thanks though!