Passing date parameters through URL

0

Hello everyone !

I have a report with dates parameters (java.util.date) and I can't pass them as arguments by URL.

When I searched for a solution, I found that some people made it by passing dates with this format "yyyyMMddHHmmss", but when I try to do so, I haven't got the good date : 

 -> 

Is there a way to pass a Date parameter by URL ? (not with a string parameter converted to a date inside the query)

Thanks in advance for your time !

 

iggythedog91's picture
Joined: Sep 20 2019 - 2:08am
Last seen: 7 hours 31 min ago

Finally I tried with the format YYYY-MM-DD as you mentionned danoldenkamp and it worked directly in the URL !

(&date_debut=2018-06-01)

Thanks for your help !

iggythedog91 - 3 months 5 days ago

1 Answer:

1

Try making a second parameter from the first datetime but make the new parameter a string.

If you only need the date the simplest way is to format as YYYY-MM-DD

You should be able to pass that back into a Date.

danoldenkamp@gmail.com's picture
Joined: Aug 29 2018 - 11:12am
Last seen: 1 week 5 days ago
Feedback