Get Data created between 10pm(Today) to 7am(Tomorrow)
Question
Application Type
Reactive

Hi,

I have an aggregate that displays all the data created today by filter Created Date = CurrDate(),

How about displaying all the data that was created between 10 pm (today) to 7 am(tomorrow) 

I hope someone could help me with this.

Thank you

It's not just using CurrDateTime() it is more complex



Tell me if it worked for you.

Hi Ruzzel John Bisnar,
My name is Cristian, And I am helping in the forum with the intention of becoming an MVP, your like helps me a lot and even better if I manage to solve your issue.

The filter you are trying to do could be done from an aggregate or from sql commands.

Could you show more information about the entity to which you want to do the filter?

Hi @Cristian Angel Puma Villalva ,

I have an entity called the booking process and filtered by the current date to get the sum of Total working hours for each booking process created by the current date

but I have users that starts at 11 pm and then when the time reached by 12midnight, the booking process created between 11pm - 11:59pm will be not included on the aggregate due to my current filter is by currdate()

I hope you understand my explanation.

Thank you

I don't understand something, ProductivityReport.date, which data type is Date or dateTime, the CurrDate() function returns date.


What your filter is doing is filtering the reservations of the day, and the problem occurs with the reservations from 11 to 11:59,


IF we were to use a CurrDateTime() could we give it the option so that it can Filter an hour before?


Doubts :

In this aggregate you are only using only one entity?

ProductivityReport.date what is its dataType?

Are you using local entities or server?

ProductivityReport.Date data type is only a Date.


Yes, I can use CurrDateTime by changing ProductivityRerport.Date which is data type is a date to ProductivityRerport.CreatedOn which is data type is DateTime


Doubts:
1. I'm using 4 entity

2.  ProductivityReport.Date is Date

3. I'm using server

Yes, I can use CurrDateTime by changing ProductivityRerport.Date which is data type is a date to ProductivityRerport.CreatedOn which is data type is DateTime

ok so your filter would be like this:

Productivity Report.CreatedOn >= today's date at 10pm AND

ProductivityReport.CreatedOn <= tomorrow at 7am

https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Logic/Built-in_Functions/Date_and_Time

Sorry, but what do you mean by this: Productivity Report.CreatedOn >= today's date at 10pm

 is it Productivity Report.CreatedOn >= CurrDateTime()

How can I set a specific time on CurrDateTime() like on your example "at 10pm"


It's not just using CurrDateTime() it is more complex



Tell me if it worked for you.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.