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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

How to get last 5 days and 24 Days data in posgres with one service

yasmalik
9-Granite

How to get last 5 days and 24 Days data in posgres with one service

I have one service which has one input as period I put days value it give error but when put it hardcode values then it works fineCapture.PNG

1 ACCEPTED SOLUTION

Accepted Solutions

Hi,

 

Try this:

 

select "Date","Temp"

from public."Temperature" where "Date" between (now()-[[period]]::interval) and now();

 

On my end is working fine.

 

Hope it helps,

Raluca Edu

View solution in original post

2 REPLIES 2

Hi,

 

Try this:

 

select "Date","Temp"

from public."Temperature" where "Date" between (now()-[[period]]::interval) and now();

 

On my end is working fine.

 

Hope it helps,

Raluca Edu

Thank you so much It's working

Top Tags