PostgreSQl Query issue

I have named query starting like this
SELECT :startDate as Date

but i want query like both startdate and enddate value and I want dispaly in report both startdate and enddate like this
SELECT :startDate,:endDate as Date

13/05/31 - 18/05/31

how to declare this ?

Give them their own names, like so, for syntactically correct SQL:

Select :startDate As StartDate, :endDate As EndDate

You can wrap those with various SQL date formatting expressions, which will yield strings.

But you don’t need a query to format the dates for display. I would create additional data keys that just used the dateFormat() expression function to get your desired format as a string. Keychain expressions in the report design can make further adjustments.

1 Like