To calculate the difference between two dates we have the macro sc_date_dif_2, in this example we will see how it works and how to use it.
- The format with which you are keeping within the database must be taken into account:
Database Format
Macro Format Example in Documentation (https://www.scriptcase.net/docs/en_us/v9/manual/14-macros/02-macros/)
- Respecting that format we apply it within the macro sc_date_dif_2, as follows in the Blank application, in the onExecute event:
- We save the changes and execute the application: