difference between two dates

I need to get the difference between two dates
Field 1 = dates from
Field 2 = date field to
Field 3 = days

Add an ajax event:

{Field 3} = {Field 2} - {Field 1};
but does not work just subtract the years
help please

Re: difference between two dates

Hi ,

try to use SCRIPTCASE MACROS syntax (see help macros)

sc_date_dif({Date1}, “Format Date1”, {Date2}, “Format Date2”)

Bye
Giovannino

Re: difference between two dates

so is to fill the frame

{licencia_dias} = sc_date_dif( {licencia_desde}, ‘dd/mm/aaaa’, {licencia_hasta} , ‘dd/mm/aaaa’);

but no where is ajax events and event or php methods can help me where I put the macro please

Re: difference between two dates

Call the macro from Onchange event of {licencia_desde} and {licencia_hasta} fields.
JG

Re: difference between two dates

please do not get clearer
I think ajax event
but for field
example fields:
dated 1
dated 2
days
need
days = direfencia between date 1 and date 2