Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Calculate date difference

$
0
0
Hi,
I need to calculate the difference between two dates in days. I need it to work within the Model Builder since these are models that need to be published later as a GP service. I have two fields, one with the Inspection date and the other with the Current date.
Something similar to the below VBscript:

Code:

DateDiff("d", [date_field], Now())
Any advice will be appreciated. Thanks in advanced.

Viewing all articles
Browse latest Browse all 2485

Trending Articles