Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

request for current date between Date1 from/to or Date2 from/to

Uwe_Speckels April 14, 2020

Hello,

who can give me a hint? I have to prepare a JQL date comparison with 2 different dates.

1. 1st of all I have the current date
2. planned project date from/to ---> always filled
3. actual project date from/to -----> sometimes not filled

If the current date is between the planned project date then I have to list the project no. to the project leader. In all other cases no listing depending on actual project date.

If the actual project date is filled then I have to do the same check and listing.

Best regards,
Uwe

1 answer

1 accepted

0 votes
Answer accepted
Muthu Thiruppandy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 14, 2020

Try the following approach:

project = xx AND planned_start < now() and Planned_end > now() OR project = xx AND Actual_start < now() and Actual_end > now()

Uwe_Speckels April 15, 2020

Hello,

you're right with the statement. Thanks.

In this case, I have another question. I can't find any solution in the WWW. How can I calculate with now(). Now() doesn't accept any parameters. How it looks like e.g.:

now() -1y or
now() +15d

Thanks, for further help.

Uwe

Muthu Thiruppandy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 15, 2020

You are correct, the function now() does not accept parameters.  you can do the same with the function startOfDay(), like startOfDay(1), startOfDay("-2d")

Suggest an answer

Log in or Sign up to answer