4D Blog

Home Guest Post How to create a simple “TimeStamp” class in 4D

How to create a simple “TimeStamp” class in 4D

August 20, 2020

Guest Post

by guest author Tiran Behrouz, 4D developer (Vancouver, Canada) 

The introduction of ORDA in 4D v17 was a game-changer. Now with the introduction of classes in 4D v18 R3, we will witness a paradigm shift in 4D programming. We can now take advantage of object-oriented programming concepts such as polymorphism, composition, and inheritance to write our own class libraries. In this video, I demonstrate how to code a simple TimeStamp class using 4D and ORDA. 

I used 4D v18 R4 for this tutorial. You can also use the public 4D v18 R3 to develop this class, but your variable declarations will have to follow the classic 4D syntax. For example:

  • C_LONGINT ($n) instead of var $n: Integer
  • C_OBJECT ($1) instead of var $1: cs.Class.TimeStamp

 

The source code can be found here. Join the discussion on the 4D forum for questions and feedback.

Discuss

Tags Class, Programming, Tutorial

Latest related posts

  • August 17, 2021

    4D v19 performance on Apple M1

  • February 18, 2021

    Apply naming conventions with Form macros

  • March 2, 2020

    List box typeahead: Intuitive list searching

Tiran Behrouz
Tiran Behrouz
Tiran has been developing B2B software with 4D since 2003. He has a passion for problem-solving and finding easy solutions to challenging problems. He is the CEO of Clear View Systems (CVS) based in Vancouver Canada. CVS develops software and solutions for small financial companies. He is the main developer of CurrencyXchanger which is being used by over 350 companies in 40+ countries. Tiran has a Computer Science degree from the University of British Columbia and an MBA in Technology Management from the University of Phoenix. In his free time, Tiran enjoys reading, hiking, and biking.
  • 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 R9 20 R10 Administration Authentication Build application CI/CD Class Client/Server Code editor Collections Compatibility settings Formula Google Listbox Logs Mail Microsoft 365 Network Objects ORDA PDF Pictures Preemptive Programming 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 R9 20 R10 Administration Authentication Build application CI/CD Class Client/Server Code editor Collections Compatibility settings Formula Google Listbox Logs Mail Microsoft 365 Network Objects ORDA PDF Pictures Preemptive Programming 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