how to get last day date range ?

Hello all

I want to get lat day range like below:
from_date : yyyy-mm-dd hh:mm:ss
to_date: yyyy-mm-dd hh:mm:ss

for last day. for example:
from_date : 2022-10-22 14:00:00
to_date: 2022-10-23 14:00:00

thanks a lot

If they are in the same column then use the GroupBy node to do a Min and Max calculation on the column leaving the group election blank.

2 Likes

Hi @habibi and welcome to the Knime Community.

I’m not sure I understand your question.

If you are given a range, isn’t the last day the “to_date”? In your example, the last day will be 2022-10-23.

Can you may be show us what the input is, and what would the expected results be for that input?

1 Like

thanks dear @bruno29a

i mean is there any way that knime get current date and give me last 24hours date as string:
yyyy-mm-dd hh:mm:ss

thanks

Current Date minus 24.knwf (20.5 KB)

If you mean by “current date” the time of workflow execution, then this should do it. It is in date format, but you can easily change it to string for display purposes. If it is used for filtering, then it is best to keep it in date format.

2 Likes

You could drag your workflow to the top. I almost missed it without the outline view :wink:
br

:joy: This is a pretty regular complaint that I get which is caused by 20-10 vision, a large 4k monitor and distant zoom settings.

I normally do forum help on my side laptop which has much more reasonable viewing settings.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.