Forum Discussion

amit_saroha's avatar
amit_saroha
New Contributor III
3 years ago
Solved

Date Issue in Pipeline Parameter

Hi All, I have a requirement to pass date in YYYY-MM-DD format and I am using the expression “Date.now().toLocaleDateString()” but I have the below issue. When I use it in pipeline parameter...
  • bojanvelevski's avatar
    bojanvelevski
    3 years ago

    When you need to run the pipeline with earlier dates, is it going to be a manual configuration and run?

    You can simply configure the BatchParameterD1 like this:

    _Effective_Date == "" ? Date.now().toLocaleDateString() : _Effective_Date

    That way, if the parameter is not empty, it will be taken into consideration, if it is, than the current date will be generated.