Closed calexh-sar closed 2 years ago
@calexh-sar It's possible for latest_record to be None. You should probably test to make sure it isn't None before running this code:
last_instance_timestamp = latest_record["timestamp"] last_instance_date_time = get_localtime(timestamp=last_instance_timestamp) last_instance_date_str = last_instance_date_time.strftime('%m-%d-%Y') last_instance_time_str = last_instance_date_time.strftime('%I:%M %p')
Closing based on Mike's comment
When running this code in a Script Task in my Sandbox workflow
I receive this error:
The code runs without error in the app.