Bu sayfa henüz yerel dilinizde mevcut değildir. Daha fazla dil seçeneği eklemek için yoğun bir şekilde çalışıyoruz. Desteğiniz için teşekkür ederiz.
- What's New
- Service Overview
-
User Guide
- Preparations
- IAM Permissions Management
- Data Management
- Data Integration
- Data Development
- Solution
- O&M and Scheduling
- Configuration and Management
- Specifications
- Usage Tutorials
-
References
-
Nodes
- Node Overview
- CDM Job
- DIS Stream
- DIS Dump
- DIS Client
- Rest Client
- Import GES
- MRS Kafka
- Kafka Client
- CS Job
- DLI SQL
- DLI Spark
- DWS SQL
- MRS SparkSQL
- MRS Hive SQL
- MRS Presto SQL
- MRS Spark
- MRS Spark Python
- MRS Flink Job
- MRS MapReduce
- CSS
- Shell
- RDS SQL
- ETL Job
- OCR
- Create OBS
- Delete OBS
- OBS Manager
- Open/Close Resource
- Data Quality Monitor
- Subjob
- SMN
- Dummy
- For Each
- EL
-
Nodes
- Change History
- API Reference
-
FAQs
- What Is DLF?
- What Is DLF Used For?
- What Is a Job?
- How Many Jobs Can Be Created in DLF?
- Can I Adjust the Job Quota in DLF?
- Does DLF Provide Job Templates?
- What Is a Node?
- Is There a Limit on the Number of Nodes Contained in a DLF Job?
- How Can I Quickly Rectify a Deleted CDM Cluster Associated with a Job?
- What Causes a Large Difference Between the Plan Time and Start Time of a Job?
- How Do I Change the Message Language?
- What Can I Do When a Job Fails?
- Glossary
- General Reference
Copied.
DateUtil Embedded Objects
A DateUtil embedded object provides methods of formatting time and calculating time.
Methods
Method |
Description |
---|---|
String format(Date date, String pattern) |
Formats Date to character strings according to the specified pattern. |
Date addMonths(Date date, int amount) |
After the specified number of months is added to Date, the new Date object is returned. The amount can be a negative number. |
Date addDays(Date date, int amount) |
After the specified number of days is added to Date, the new Date object is returned. The amount can be a negative number. |
Date addHours(Date date, int amount) |
After the specified number of hours is added to Date, the new Date object is returned. The amount can be a negative number. |
Date addMinutes(Date date, int amount) |
After the specified number of minutes is added to Date, the new Date object is returned. The amount can be a negative number. |
int getDay(Date date) |
Obtains the day from the date. For example, if the date is 2018-09-14, 14 is returned. |
int getMonth(Date date) |
Obtains the month from the date. For example, if the date is 2018-09-14, 9 is returned. |
int getYear(Date date) |
Obtains the year from the date. For example, if the date is 2018-09-14, 2018 is returned. |
Date now() |
Returns the current time. |
long getTime(Date date) |
Converts the date type to the long type. |
Date parseDate(String str, String pattern) |
Converts the character string to the date by pattern. The pattern is the date and time mode. For details, see Date and Time Mode. |
Example
The previous day of the job scheduling plan time is used as the subdirectory name to generate an OBS path. The EL expression is as follows:
#{"obs://test/"+DateUtil.format(DateUtil.addDays(Job.planTime,-1),"yyyy-MM-dd")}
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot