Skip to content
DataMiner Dojo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • YouTube Videos
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Agility
      • Learn more about Agile
        • Agile Webspace
        • Everything Agile
          • The Agile Manifesto
          • Best Practices
          • Retro Recipes
        • Methodologies
          • The Scrum Framework
          • Kanban
          • Extreme Programming
        • Roles
          • The Product Owner
          • The Agile Coach
          • The Quality & UX Coach (QX)
      • Book your Agile Fundamentals training
      • Book you Kanban workshop
    • >> Go to DataMiner Docs
  • DevOps
    • About the DevOps Program
    • Sign up for the DevOps Program
    • DataMiner DevOps Support
    • Feature Suggestions
  • Downloads
  • Swag Shop
  • PARTNERS
    • Business Partners
    • Technology Partners
  • Contact
    • Sales, Training & Certification
    • DataMiner Support
    • Global Feedback Survey
  • >> Go to dataminer.services

date in hexadecimal

65 views12 hours ago
0
Alex Gomez Gomez24 14 hours ago 0 Comments

The dataminer element shows me the date of the equipment in hexadecimal

Maria Correa [SLC] [DevOps Advocate] Answered question 12 hours ago

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
0
Maria Correa [SLC] [DevOps Advocate]172 Posted 12 hours ago 0 Comments

Hello,
You might have to leave the type as an octetstring and parse the hex value on a QAction to return a double value and then set that double value to another parameter of interprete type double with measurement type date number.

So for example: (a quick method made in copilot)
private static double ParseDateValue(SLProtocol protocol, string value)
{
if (string.IsNullOrWhiteSpace(value))
throw new ArgumentException("Invalid input");

value = value.Replace(".", "");

// Required: YYYYMMDD (hex)
if (value.Length < 8)
throw new FormatException("Invalid date format");

int year = Convert.ToInt32(value.Substring(0, 4), 16);
int month = Convert.ToInt32(value.Substring(4, 2), 16);
int day = Convert.ToInt32(value.Substring(6, 2), 16);

int hour = 0, min = 0, sec = 0, ms = 0;

if (value.Length >= 12)
{
hour = Convert.ToInt32(value.Substring(8, 2), 16);
min = Convert.ToInt32(value.Substring(10, 2), 16);
}

if (value.Length >= 16)
{
sec = Convert.ToInt32(value.Substring(12, 2), 16);
ms = Convert.ToInt32(value.Substring(14, 2), 16);
}

// Ignore timezone (same as original)
var dt = new DateTime(year, month, day, hour, min, sec, ms);

return dt.ToOADate();
}

And you want to set the return value to a parameter like this:

<Param id="1" trending="false">
		<Name>ParsedDatetime</Name>
		<Description>Parsed DateTime</Description>
		<Information>
			<Subtext></Subtext>
		</Information>
		<Type>read</Type>
		<Interprete>
			<RawType>numeric text</RawType>
			<LengthType>next param</LengthType>
			<Type>double</Type>
			<Decimals>8</Decimals>
		</Interprete>
		<Display>
			<RTDisplay>true</RTDisplay>
		</Display>
		<Measurement>
			<Type options="date">number</Type>
		</Measurement>
</Param>
Maria Correa [SLC] [DevOps Advocate] Answered question 12 hours ago
0
Miguel Obregon [SLC] [DevOps Catalyst]22.57K Posted 13 hours ago 2 Comments

Hi Alex,

Can you try the suggestions described in these questions:

  • Driver: convert hexadecimal value to letters
  • Converting SNMP octetstrings to readable ASCII in xml code

Hope it helps.

Update:

Having a look at the OID definition:

It seems that changing the type will not make a difference. Looking at other connectors that implement the same OID, I noticed that a QAction is required to parse the raw data so the datetime can be displayed correctly in the parameter.

Miguel Obregon [SLC] [DevOps Catalyst] Edited answer 12 hours ago
Alex Gomez Gomez commented 13 hours ago

OctetStringASCII or the OctetStringUTF8, It gives me the same result, Any suggestions?

Miguel Obregon [SLC] [DevOps Catalyst] commented 12 hours ago

Hi Alex,
See updated answer.

Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2026 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin