Skip to main content
PI System
Data Parsing
Real-Time Data

Handling the 24:00 Timestamp in OSIsoft PI UFL

Explore solutions for parsing 24:00 timestamps with OSIsoft's PI UFL after version updates.

Roshan Soni

3 min read

Handling the 24:00 Timestamp in OSIsoft PI UFL

OSIsoft's PI System is revered for its robustness in handling real-time data streams from various assets. The PI UFL (Universal File and Stream Loading) interface is a component that enables users to parse and process data from almost any text-based source. Recently, users upgrading to the latest version of UFL may have encountered an issue parsing 24:00 timestamps, which, while not standard, are surprisingly common. Here, we'll explore the problem and share solutions users have implemented.

The Issue with 24:00 Timestamps

In many programming standards, the representation of time should range from 00:00 to 23:59. While "24:00" is commonly used to indicate the end of a day, it often lies outside the standard acceptability range for parsers dealing strictly with HH:MM formats. In version 3.6.7.136 of UFL, a configuration challenge appears where the parser skips lines containing 24:00 timestamps without throwing an error.

Before updating, users could process data with non-standard timestamps such as:

HM3635   1   12/10/2020   24:00   0

After the update, this line is ignored, indicating a change or tightening in the parsing behavior regarding timestamp formats.

Solutions: Enhancing UFL Configuration

The crux of resolving this issue lies in managing how UFL interprets timestamps. Here are some potential solutions:

  1. Modify Timestamp Format: Right now, the simplest fix is transforming the timestamp "24:00" to "00:00" of the next day. This can be done in pre-processing scripts or directly during the data acquisition stage if possible.

  2. Script-Based Adjustment: Extract the date and time into separate variables using UFL's scripting capabilities. If UFL encounters "24:00," increment the date by one day and set the hour and minute to "00:00".

// Example UFL Script Concept
GetDateTime = if(TimeStamp == "24:00", DateTime.AddDays(1).ToString("MM/dd/yyyy 00:00"), TimeStamp);
  1. Request UFL Enhancements: Users can provide feedback to OSIsoft for supporting non-standard timestamps like "24:00" as part of their configuration files in the next UFL updates.

Conclusion

While the current UFL version requires workarounds to handle non-standard timestamps, these solutions help in adapting existing configurations and scripts. Users should consider implementing these fixes within their data pipelines or pushing for feature enhancements to better support these timestamp formats in future UFL iterations.

Maintain your data streams' integrity by staying aware of parsing changes during software updates, and always test configurations in a controlled setting before full implementation.

Tags

#OSIsoft PI
#PI UFL
#Timestamp Parsing
#Data Processing

About Roshan Soni

Expert in PI System implementation, industrial automation, and data management. Passionate about helping organizations maximize the value of their process data through innovative solutions and best practices.

Sign in to comment

Join the conversation by signing in to your account.

Comments (0)

No comments yet

Be the first to share your thoughts on this article.

Related Articles

Enhancing PI ProcessBook Trends with Banding and Zones: User Needs, Workarounds, and the Road Ahead

A look at the user demand for trend banding/zoning in OSIsoft PI ProcessBook, current VBA workarounds, UI challenges, and how future PI Vision releases aim to address these visualization needs.

Roshan Soni

Migrating PIAdvCalcFilVal Uptime Calculations from PI DataLink to PI OLEDB

Learn how to translate PI DataLink's PIAdvCalcFilVal advanced calculations—like counting uptime based on conditions—into efficient PI OLEDB SQL queries. Explore three practical approaches using PIAVG, PIINTERP, and PICOunt tables, and get tips for validation and accuracy.

Roshan Soni

Understanding PI Web API WebID Encoding: Can You Generate WebIDs Client-Side?

Curious about how PI Web API generates WebIDs and whether you can encode them client-side using GUIDs or paths? This article explores the encoding mechanisms, current documentation, and best practices for handling WebIDs in your applications.

Roshan Soni