4D Blog

Home Product Timestamp is now available !

Timestamp is now available !

February 23, 2017

Product 4D: New timestamp command

“Time is money“, said Benjamin Franklin, so the more accurately we can count it, the better. We now have a new command for getting a precise UTC time stamp including milliseconds.

You want to have exact logs over a long period? The new Timestamp command allows you to retrieve the date and time in an international standard format with milliseconds. That will make precise time stamping easier for close operations performed in different places over the world.
This command returns a string in ISO8601 format which looks like this: “2016-09-24T07:30:055Z”. Conveniently, the string order of such timestamps is the same as their chronological order so you can easily order your timestamped operations from oldest to newest.

You can use Timestamp in a log file to know precisely when the events occurred. As shown in the example below you can have several operations in the same second:

$vhDocRef:=Append document("TimestampProject.log")
$logWithTimestamp:=Timestamp+Char(Tab)+"Log with timestamp"+Char(Carriage return)
SEND PACKET($vhDocRef;String($logWithTimestamp))
--------------------------------------------------------
Result:
2016-12-12T13:31:29.477Z   Log with timestamp
2016-12-12T13:31:29.478Z   Connection of user1
2016-12-12T13:31:29.486Z   ERROR - Exception of type 'System exception'
2016-12-12T13:31:29.492Z   Click on button1684
2016-12-12T13:31:29.502Z   [SP_HELP- 1 rows] Command processed
2016-12-12T13:31:29.512Z   [SP_HELP- 5 rows] Result set fetched

For more details, we recommend that you take a look at the 4D v16 R2 documentation:

  • Timestamp command

 

Discuss

Tags v16 R2, v17

Latest related posts

  • June 16, 2025

    Generate, share and use web sessions One-Time Passcodes (OTP)

  • May 20, 2025

    Automatic Refresh of OEM Build Licenses

  • May 16, 2025

    New class to handle incoming TCP connections

Fabrice Mainguené
Fabrice Mainguené
• Product Owner •Fabrice Mainguené joined 4D Program team in November, 2016. As a Product Owner, he is in charge of writing the user stories then translating it to functional specifications. His role is also to make sure that the feature implementation delivered is meeting the customer need.After obtaining a Bachelor degree in Computer Science at CNAM, Fabrice joined a small software publishing company as a Windev developer. Then he worked for different companies in industry and trade areas as a Windev and web developer as well as technical advisor on new features.
  • Deutsch
  • Français
  • English
  • Português
  • Čeština
  • Español
  • Italiano
  • 日本語

Categories

Browse categories

  • 4D View Pro
  • 4D Write Pro
  • 4D for Mobile
  • Email
  • Development Mode
  • 4D Language
  • ORDA
  • User Interface / GUI
  • Qodly Studio
  • Server
  • Maintenance
  • Deployment
  • 4D Tutorials
  • Generic
  • 4D Summit sessions and other online videos

Tags

4D-Analyzer 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R8 20 R9 Administration Authentication Build application CI/CD Class Client/Server Code editor Collections Compatibility settings Formula HTTP Listbox Logs Mail Network Objects ORDA PDF Pictures Preemptive Programming Qodly Studio REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor

Tags

4D-Analyzer 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R8 20 R9 Administration Authentication Build application CI/CD Class Client/Server Code editor Collections Compatibility settings Formula HTTP Listbox Logs Mail Network Objects ORDA PDF Pictures Preemptive Programming Qodly Studio REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor
Subscribe to 4D Newsletter

© 2025 4D SAS - All rights reserved
Terms & Conditions | Legal Notices | Data Policy | Cookie Policy | Contact us | Write for us


Subscribe to 4D Newsletter

* Your privacy is very important to us. Please click here to view our Policy

Contact us

Got a question, suggestion or just want to get in touch with the 4D bloggers? Drop us a line!

* Your privacy is very important to us. Please click here to view our Policy