Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
YouTube Security VideosNutanix advances legacy and AI app management with AMD(01.10.2026 um 16:00 Uhr)
•
YouTube Security VideosPC-WELT: 32 TB SSD-Speicher in der HMX 6!(01.10.2026 um 16:15 Uhr)
••••
Videos & KonferenzenPC-WELT: 32 TB SSD-Speicher in der HMX 6!(01.10.2026 um 16:15 Uhr)
••
Sicherheitslücken (CVE)USN-8857-1: KCoreAddons vulnerability(01.10.2026 um 12:48 Uhr)
•••
YouTube Security VideosNutanix advances legacy and AI app management with AMD(01.10.2026 um 16:00 Uhr)
•
YouTube Security VideosPC-WELT: 32 TB SSD-Speicher in der HMX 6!(01.10.2026 um 16:15 Uhr)
••••
Videos & KonferenzenPC-WELT: 32 TB SSD-Speicher in der HMX 6!(01.10.2026 um 16:15 Uhr)
••
Sicherheitslücken (CVE)USN-8857-1: KCoreAddons vulnerability(01.10.2026 um 12:48 Uhr)
•••
Intelligence View
⚡ tsecurity.de Intelligence

A Quick Guide to Uniface's `lineartime` Data Type ⏱️

Hey dev community! 👋 Today, let's dive into a specific feature of the low-code development platform Uniface: the lineartime data type. It might seem like a sm…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!

Hey dev community! 👋



Today, let's dive into a specific feature of the low-code development platform Uniface: the lineartime data type. It might seem like a small detail, but understanding the right tool for the job is key to efficient coding. So, what is it and when should you use it?






What Exactly is lineartime\?



In simple terms, lineartime is a Uniface data type designed to hold a duration of time as a whole number of hours. Think of it as a simple hour counter. 🔢



It's an integer that can hold a value from 0 to 24. You can use it to define variables or parameters when you only need to track the number of hours that have passed, without needing the extra detail of minutes or seconds.






How to Use It: An Example 💻



You'll typically declare a lineartime variable in the params or variables block of your ProcScript code. The real power comes when you're calculating elapsed time.



Let's look at an example straight from the documentation:




 params time pTimeStamp : IN lineartime pElapsedTime : OUT endparams pElapsedTime = $clock - pTimeStamp 









Breaking Down the Code:




  • params...endparams: This block defines the input and output parameters for an operation or component.

  • time pTimeStamp : IN: This is our input. It's a standard time data type, which holds a specific time of day (e.g., 14:30:15).

  • lineartime pElapsedTime : OUT: This is our output. This is where the calculated result—the elapsed hours—will be stored.

  • pElapsedTime = $clock - pTimeStamp: This is where the magic happens! $clock gives you the current system time. Uniface calculates the difference between the current time and the input pTimeStamp and cleverly stores the result as a whole number of hours in our pElapsedTime variable.






When Should You NOT Use lineartime\? 🤔



This one is simple: if you need more precision, lineartime is not the right choice! 😅



If your application needs to track minutes, seconds, or even milliseconds, you should use a more detailed data type like lineardatetime instead. The lineartime data type will simply truncate any value smaller than a full hour.






Conclusion



The lineartime data type in Uniface is a niche but useful tool for calculating and storing time durations in whole hours. It's perfect for simple time-tracking where precision isn't a concern.



Happy coding! ✨






P.S. This post was crafted with the help of an AI assistant to ensure clarity and accuracy, based on the official Uniface 10.4 documentation.

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten A Quick Guide to Uniface's `lineartime` Data Type ⏱️

Thematisch verwandte Begriffe: Quick, Guide, Unifaces, lineartime · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag