Custom Field (Difference between two dates)

How would I handle this, in the database I have

date_started, date_finished

I’d like to have the date difference between the two fields as a separate column.

So:

date_started | date_finished | days_to_complete

What’s the best way to handle this in Scriptcase?

Hello,

You can use SC’s macro sc_date_dif to handle it.

For more info: http://downloads.scriptcase.com.br/downloads/v6/manual/en_us/webhelp/manual_mp/28-Macros/00-macros_sc.htm#sc_date_dif

If it was the case which sc_date_dif didn’t existed, and you could handle it perfoming a SELECT on your RDBMS, you could use sc_lookup macro to run any SELECT statement.

See more: http://downloads.scriptcase.com.br/downloads/v6/manual/en_us/webhelp/manual_mp/28-Macros/00-macros_sc.htm#sc_lookup

regards,
Bernhard Bernsmann