Constant Data | Time Data
Learn how to work with constant data in Momen. Understand time, date, and timestamp data types and discover when to use them.
Introduction
In this tutorial, we will help you to learn about Constant Data and Time Data. Whether you're a beginner or an experienced user, this tutorial provides a straightforward guide to help you master these data types.
Time-related data processing in Momen encompasses three data types: time, date, and timestamp. It's essential to grasp these data types when working with time-related operations.
Time Data Type | Judgement | Calculation |
---|---|---|
Current Time (Time) | ✅ | ❌ |
Current Data (Date) | ✅ | ❌ |
Current Time Date (Timestamp) | ✅ | ✅ |
💡Tips:
The number of milliseconds stored behind the timestamp is from 0:0 on January 1, 1970, to a certain point in time. It is recommended to use timestamps as much as possible because a well-defined point in time records the most complete information.
When to Use
Time data should be used in constant data when it is necessary to make conditional judgments or perform data insertion operations based on the current time. If a fixed time is to be processed, such as a comparison with February 22, 2022, the time should be stored in the backend for remote data calls, not as time data.
Usage
Current Time, Date
This refers to the time at the moment. For example, "14:03". It changes instantly with system time changes.Refers to today's date, like "November 11, 2023." It updates with system date changes.
Current Time Date
Configure it to obtain a time point based on a specific time interval from the current time (e.g., seven days ago at 00:00; one year from now).
Area 1: Expresses the relative relationship with the current time, such as how many hours later or months ago.
Area 2: Describes area 1 in terms of "number". This must be set to 0 if it is to indicate "Today".
Area 3: Details the current relationship with time. If left blank, it signifies the current point in time. Fill in a specific number to store as the corresponding value.
💡Tips:
After selecting the format, the data type of the current time and date changes from timestamp to text. Ensure you use the default format for conditional judgment and storage.
Avoid using "month" as the calculation range due to varying days in each month.
Use Case
A user subscribes to a two-year membership, and their expiration time is recorded upon successful recharge.
Pickup is scheduled for 2:00 p.m. the next day.
The registration button closes 10 minutes before the event starts: event start time < current time + 10 minutes.
Formatting Time Types
Formatting Date Types
Formatting Timestamp Types
About Momen
Momen is a no-code web app builder, allows users to build fully customizable web apps, marketplaces, Social Networks, AI Apps, Enterprise SaaS, and much more. You can iterate and refine your projects in real-time, ensuring a seamless creation process. Meanwhile, Momen offers powerful API integration capabilities, allowing you to connect your projects to any service you need. With Momen, you can bring your ideas to life and build remarkable digital solutions and get your web app products to market faster than ever before.
Last updated