Using the macro sc_date_dif_2

Á

Álvaro Moura

Last updated on Jul 6, 2026

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.

  1. 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/)

  1. Respecting that format we apply it within the macro sc_date_dif_2, as follows in the Blank application, in the onExecute event:

  1. We save the changes and execute the application: