Jump to content

Recommended Posts

Posted

I am creating a C# program to fetch the "Last Boot Uptime" for all devices under a particular group with /v3/assets

But the time format is inconsistent for some devices. Some are in 24hr format others in 12hr format, some has the weekday on it etc.. 

Eg:

15 February 2024 21:58
22 February 2024 08:57
12 March 2024 08:24
18 March 2024 01:33
17 February 2024 02:11
15 February 2024 21:50
11 March 2024 15:08
17 February 2024 02:44
29 February 2024 00:36
16 March 2024 00:33
16 March 2024 01:29
06 February 2024 15:24
13 March 2024 08:46
Saturday, 2 March 2024 10:12 a.m.
Thursday, 14 March 2024 1:36 AM
Saturday, February 24, 2024 20:02
Thursday, 14 March 2024 11:08 pm

Most of the result are in dd MMMM yyyy HH:mm format.

Except once pc all others are windows. I checked the datetime format in windows for two PC's that had different boot up time format in REST API result but both windows time formats were same.

How to get a unified time format as the API result ? 

 

 

  • Administrators
Posted

Hey @JpBIT

Thanks for reaching out, Could you please share with me your code and the format you get when you run the code on the the machine?

Thanks a mill
Stefan 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...