Count date range?

  

How can I count the days of the my date input to current date ?

did you check the built-in functions...

Thank you for your response. I'm new in outsystems even though I know the built-in function of datetime I don't know where to use it in outsystems. Can you be more specific on how to use it in outsystems?


J. wrote: 

did you check the built-in functions...



Hi,

If you are new to outsystems I do hope you have/are following the online-courses?

That said, you can use it normally in (screen)actions, or as a result in your screen in an expression.


For example, you can edit a value in the Expressions Editor. The descriptions of the built-in functions, with some examples, are also available in the editor.

  1. Drag the Expression widget from the widget toolbar (left) and drop it to a Screen.
  2. Double-click the expression to edit the expression value.
  3. In the pane below select the function you need.

Solution

Hi Karl,

The expression you need to calculate the difference in days between the two dates is as follows:

DiffDays(YourDateInput, CurrDate())

You need to use DiffDays, read more here: https://success.outsystems.com/Documentation/10/Reference/Logic/Built-in_Functions/Date_and_Time_Built-in_Functions

The rest of your doubts have already been answered above. I recommend you to follow the tutorials, they explain there these questions you have.

Solution

Thank you for your response. It works fine now. 

May I know the difference between Date_Difference() and DiffDays()? because first I used Date_Difference() and its not working but DiffDays() works fine.

I mark your answer as a solution. Thank you.

Paulo Cação wrote:

Hi Karl,

The expression you need to calculate the difference in days between the two dates is as follows:

DiffDays(YourDateInput, CurrDate())

You need to use DiffDays, read more here: https://success.outsystems.com/Documentation/10/Reference/Logic/Built-in_Functions/Date_and_Time_Built-in_Functions

The rest of your doubts have already been answered above. I recommend you to follow the tutorials, they explain there these questions you have.