dolphinscheduler icon indicating copy to clipboard operation
dolphinscheduler copied to clipboard

[Feature][param] The built-in parameters cannot express the beginning date of the month for n-1 days

Open 12frame opened this issue 1 year ago • 3 comments

Search before asking

  • [X] I had searched in the issues and found no similar feature requirement.

Description

example: Today is August 26, 2024 Yesterday: $[yyyy-MM-dd-1] = 2024-08-25 At the beginning of the month: ??? = 2024-08-25 --> 2024-08-01 Unable to obtain the beginning date of the month based on $[yyyy-MM-dd-1]

Use case

I hope to express it through built-in parameters and pass the parameters through another task

Related issues

No response

Are you willing to submit a PR?

  • [ ] Yes I am willing to submit a PR!

Code of Conduct

12frame avatar Aug 26 '24 08:08 12frame

@12frame did you tried this $[month_begin(yyyy-MM-dd, -1)]

charan2628 avatar Aug 27 '24 18:08 charan2628

Sorry, there may be a problem with my expression. You first convert it to the beginning of the month, then subtract one day What I want is to subtract one day now and convert it to the beginning of the month This way I can count the data for July on August 1st. August 2nd Statistics for August

12frame avatar Aug 28 '24 03:08 12frame

@SbloodyS for this month_begin function first param has to accept expression of this format yyyyMMdd-N, so finally it will look like this $[month_begin(yyyMMdd-1, 0)] and it will also accept old format with $[month_begin(yyyy-MM-dd, -1)]?

charan2628 avatar Aug 28 '24 17:08 charan2628