KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Note: Query and Access Date-and-Time in the era of ORDA
PRODUCT: 4D | VERSION: 17 R | PLATFORM: Mac & Win
Published On: May 30, 2019

4D v17 has introduced a new way to access and present data using ORDA. ORDA introduced new data types to represent data such as collection, entity, and entity selection. These new types offer a rich set of member methods to manipulate data using Object Notation. Some basic data types in 4D have different representation when stored inside an object-based data types like entity or entity selection in ORDA. Two examples of that are date and time value. A date value that is stored as ISO strings and Time is stored as numbers.

ORDA has also introduced new syntaxes to query the database and new formats to construct the query. For example, Date values can be passed to query() method using more than multiple formats including date, date string, and date constant. On the other hand, time values is only accepted in numbers format in query(). These new syntaxes can provide more flexibility in coding. This tech note is aimed to introduce the various usage of Date and Time in ORDA to 4D developers, and present use cases to demonstrate the differences between ORDA and current 4D language. Another objective of this tech note is to provide helpful tips to query date and time specifically using parts of date and time such as querying date by day, month, and year or querying time by hour, minute, and seconds. Finally, this tech note will present several ways to update date and time stored in object, entity selection, and collection in ORDA as well as in 4D Mobile.

Download Complete Tech Note: Tech Note Document

Commented by Toshiyuki Yamada on June 11, 2019 at 12:47 AM
accept