Calculate Number of Days from Current Date

2450
20
Jump to solution
01-30-2018 03:21 PM
DevinUnderwood2
Occasional Contributor

I am trying to use a search cursor to look  up a date field to only return LastUpdates within the last 30 days.

today = datetime.date.today()

I want to use the datetime and date field types which are in different formats and is why I can't calculate the difference.

How can I format them the same to accomplish this ?

0 Kudos
20 Replies
RandyBurton
MVP Alum

bixb0012‌, thanks for sharing the code.  It has been added to my snippets collection.

0 Kudos