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 your 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

304 views24th April 2026
3
Alex Gomez Gomez54 23rd April 2026 0 Comments

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

Robin Spruytte [SLC] [DevOps Advocate] Answered question 24th April 2026

3 Answers

  • Active
  • Voted
  • Newest
  • Oldest
1
Maria Correa [SLC] [DevOps Advocate]187 Posted 23rd April 2026 1 Comment

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>
Michiel Clepkens [SLC] [DevOps Advocate] Posted new comment 27th April 2026
Michiel Clepkens [SLC] [DevOps Advocate] commented 27th April 2026

The Interprete.Decimals and Display.Decimals tags of the parameter need to be set to 8 to avoid rounding errors. More info is available on https://docs.dataminer.services/develop/schemadoc/Protocol/Protocol.Params.Param.Measurement.Type-options.html#date

You are viewing 1 out of 3 answers, click here to view all answers.
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